Since I'm using CE I would like the body of the news to use PN-content-page-body and not PN-normal or PN-style.
I tried to alter something under \HTML\modules\News but the location proved irrelevant.
Where could I set this..?
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- mazdev responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 05:25 PM
- nestormateo responded to »Fillters in Clip« 06:33 AM
- damon responded to »Can the Updated Version Check be Turned Off (Z 1.3)« 03:19 AM
- frw responded to »Bug in the SMTP mail transfer protocol - Port 25 - Zikula 1.2.9« 22. May
- mdee responded to »Short URL questions« 22. May
- mesteele101 responded to »Problem in Database Connection« 21. May
- Herr.Vorragend responded to »Clip Documentation and Doubt« 19. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
Alter default news style (CSS classes)
-
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 42
autothemes
I don't user CE, but assuming it uses an HTML file (it may not), then you can add a
Maybe I wasn't clear about it...
I just want the news to be displayed using CSS classes other that the default PN-normal and PN-sub. What file should I hack to achieve this? -
**unknown user**
- Rank: Helper
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 676
I also don't use it, but whatever template it uses, whether it be the default themeindex (frontpage news summary) and themearticle (full news story) function in the main theme.php file, you can add the class to the existing tables. Even if they already have a class, you can apply more than one by space-separating them, so for instance:
which applies the default PN style first (often it's not even set in the stylesheet), then the CE one override that where there's a conflict. This is very handy for adding styles that does specific things like float image left/right or apply an IE boxmodel fix to the overall layout class.Code
<table class="pn-normal pn-content-page-body"
Another thing, you can wrap a DIV around anything, like
Code
<DIV class="pn-content-page-body">...stuff...</DIV>
To increase its precedence, you can be more specific in style rules:
Code
<TABLE.pn-content-page-body TD {}
More specific rules always have precedence, and IDs more than classes. Sometimes that's why your carefully crafted rules are ignored, something else overrides it. -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 42
FORGET ABOUT CE!!!
I JUST WANT TO DISPLAY THE NEWS (STORIES) NOT USING PN-SUB OR PN-NORMAL AS THEY ARE DISPLAYED BY DEFAULT, BUT USING OTHER CLASSES.
In what part of PN is the content of news generated? -
**unknown user**
- Rank: Softmore
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 365
Have you tried deleting the PN-normal tags from the style.css sheet? Or deleting it altogether. Without the style sheets the theme will default to whatever font settings are contained in the HTML (at least for an AutoTheme - I assume the same is true for a regular theme). -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 42
autothemes
Have you tried deleting the PN-normal tags from the style.css sheet? Or deleting it altogether. Without the style sheets the theme will default to whatever font settings are contained in the HTML
I can't delete PN-normal from my insatllation... how will the other modules work? -
- Rank: Developer
- Registered: Dec 31, 1969
- Last visit: Jun 01, 2010
- Posts: 6859
Did you try searching the files in the NEws module for the use of those Classes and changing them?
--
Home Page | Find on Facebook | Follow on Twitter
-
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 42
mhalbrook
Did you try searching the files in the NEws module for the use of those Classes and changing them?
Yeap!
If you visit ant story eg. http://server.com/modules.php?op=modload&name=News&file=article&sid=XXX the body of the story is enclosed in a <font class="pn-normal"> that has nothing to do with any HTML\modules\News\*PHP. To confirm that I changed all <font class="pn-normal"> inside HTML\modules\News\ to <font class="pn-cuckoo"> but the stories still keep displaying with <font class="pn-normal">.
Where else could this <font class="pn-normal"> come from..? -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 42
autothemes
Get an editor like Crimson Editor and search all the files for that class tag.
Ok, the class PN-normal appears almost 2,000 times inside the PN distribution… how will this help me? -
**unknown user**
- Rank: Softmore
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 365
Does it occur 2,000 times within a single file? I don't think so. Put on your Sherlock Holmes hat and do some sleuthing. Its obvious that no one here has an answer ready or, trust me, we'd give it to you. Maybe you can answer the question for some future reader. That is really what these forums are all about. -
- Rank: Expert
- Registered: Aug 20, 2002
- Last visit: Jan 12, 2010
- Posts: 1219
dsin
FORGET ABOUT CE!!!
I JUST WANT TO DISPLAY THE NEWS (STORIES) NOT USING PN-SUB OR PN-NORMAL AS THEY ARE DISPLAYED BY DEFAULT, BUT USING OTHER CLASSES.
In what part of PN is the content of news generated?
Re-read msandersen's post. It doesnt' have anything to do with CE and it tells you exactly what you need to do to modify the News.
-Shawn
--
Get the Revolutionary AutoTheme HTML Theme System! Currently for Zikula, PHP-Nuke, CRE Loaded, osCommerce and Wordpress! -
**unknown user**
- Rank: Helper
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 676
I'm with AbraCadaver on this, read that fella's previous post. PostNuke as it is now make poor use of Classes and IDs, all that will soon change, but in the interim the user interface on the whole is controlled through the theme.php file. Styling certain elements in individual modules can be tricky due to the few generic classes used. Deleting the PN-normal class?? Provided it doesn't interfere with everywhere ese it's used, As mentioned, if you don't define it in the user stylesheets, it doesn't do anything. You can modify the core if you REALLY want, but you shouldn't have to. Also, while still widely used, the FONT class is deprecated by the W3C, the preferred way is to either apply the class to the surrounding element or use SPAN or DIV, depending (SPAN for short bits of text, DIV for whole blocks).
So, where are the News formatted, already?
In the theme.php file, the section that controls the front-page news layout (summary) is the themeindex function, and the following function, the themearticle function controls the layout of the full story.
this is where you're likely to find your errant Font tags.
For the rest, re-read my previous post.
Go forth and conquer those tags.
Martin -
- Rank: Expert
- Registered: Dec 02, 2002
- Last visit: Apr 30, 2010
- Posts: 1474
msandersen
which applies the defauklt PN style first (often it's not eve nset in the stylesheet), then the CE one override that where there's a conflict.Code
<table class="pn-normal pn-content-page-body"
Geez, I didn't know that - thanks :)
Regards
--
-Lobos
Professional PHP Framework Services: Concept, Development and Deployment
- Moderated by:
- Support
Users on-line
- 0 users
This list is based on users active over the last 60 minutes.
