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
 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
 Quote

Status: offline

Laugh

Site Admin
Admin
Registered: 09/27/05
Posts: 1470
Location:Canada
I hope to allow admins to specify a theme for each topic in Geeklog 1.8.1
One of the Geeklog Core Developers.
 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 Frown 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

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
 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)

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
 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