Welcome to Geeklog, Anonymous Thursday, November 21 2024 @ 10:32 am EST
Geeklog Forums
Story title color by topic
Status: offline
::Ben
Forum User
Full Member
Registered: 01/14/05
Posts: 1569
Location:la rochelle, France
Hi,
I wonder if some one get a way to allow story theming by topic?
What I want to do is to display story title from topic 1 in red, and story title from topic 2 in blue.
Thanks,
Ben
I'm available to customise your themes or plugins for your Geeklog CMS
I wonder if some one get a way to allow story theming by topic?
What I want to do is to display story title from topic 1 in red, and story title from topic 2 in blue.
Thanks,
Ben
I'm available to customise your themes or plugins for your Geeklog CMS
8
6
Quote
Status: offline
suprsidr
Forum User
Full Member
Registered: 12/29/04
Posts: 555
Location:Champaign, Illinois
Since the topic is not present in the url request variables, you could query the story's content for the topic icon and base the title color based on which icon is present.
jQuery comes to mind.
-s
FlashYourWeb and Your Gallery with the E2 XML Media Player for Gallery2 - http://www.flashyourweb.com
jQuery comes to mind.
-s
FlashYourWeb and Your Gallery with the E2 XML Media Player for Gallery2 - http://www.flashyourweb.com
6
9
Quote
Status: offline
::Ben
Forum User
Full Member
Registered: 01/14/05
Posts: 1569
Location:la rochelle, France
After reading some posts I maked a simple hack in the lib-story.php file (STORY_renderArticle function) and add my new
storytext.thtml, storybodytext.thtml, featuredstorytext.thtml, featuredstorybodytext.thtml, archivestorytext.thtml, archivestorybodytext.thtml files
to my layout/professional/topics/General folder
Near line 92
if ( is_dir($_CONF['path_layout'] . '/topics/' . $story->DisplayElements('tid')) ) {
$article = new Template( $_CONF['path_layout'] . '/topics/' . $story->DisplayElements('tid') );
} else {
$article = new Template( $_CONF['path_layout'] );
}
Thanks,
Ben
I'm available to customise your themes or plugins for your Geeklog CMS
storytext.thtml, storybodytext.thtml, featuredstorytext.thtml, featuredstorybodytext.thtml, archivestorytext.thtml, archivestorybodytext.thtml files
to my layout/professional/topics/General folder
Text Formatted Code
Near line 92
if ( is_dir($_CONF['path_layout'] . '/topics/' . $story->DisplayElements('tid')) ) {
$article = new Template( $_CONF['path_layout'] . '/topics/' . $story->DisplayElements('tid') );
} else {
$article = new Template( $_CONF['path_layout'] );
}
Thanks,
Ben
I'm available to customise your themes or plugins for your Geeklog CMS
12
5
Quote
Status: offline
::Ben
Forum User
Full Member
Registered: 01/14/05
Posts: 1569
Location:la rochelle, France
With geeklog 1.8.0 replace line 98 in lib-story.php file (STORY_renderArticle function)
by
if ( is_dir($_CONF['path_layout'] . '/topics/' . $story->DisplayElements('tid')) ) {
$article = COM_newTemplate( $_CONF['path_layout'] . '/topics/' . $story->DisplayElements('tid') );
} else {
$article = COM_newTemplate( $_CONF['path_layout'] );
}
Ben
I'm available to customise your themes or plugins for your Geeklog CMS
Text Formatted Code
$article = COM_newTemplate($_CONF['path_layout']);by
Text Formatted Code
if ( is_dir($_CONF['path_layout'] . '/topics/' . $story->DisplayElements('tid')) ) {
$article = COM_newTemplate( $_CONF['path_layout'] . '/topics/' . $story->DisplayElements('tid') );
} else {
$article = COM_newTemplate( $_CONF['path_layout'] );
}
Ben
I'm available to customise your themes or plugins for your Geeklog CMS
8
8
Quote
All times are EST. The time is now 10:32 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content