Welcome to Geeklog, Anonymous Friday, March 14 2025 @ 02:27 am EDT
Geeklog Forums
Topic ID variable in article.thtml
Status: offline
beewee
Forum User
Full Member
Registered: 08/05/03
Posts: 969
Location:The Netherlands, where else?
If somebody can tell me how to get {story_topic_id} or another way to get the topic ID in article.thtml, I'll reward the GL community with a tutorial about putting topic-related banners below an article.
Dutch Geeklog sites about camping/hiking:
www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
Dutch Geeklog sites about camping/hiking:
www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
11
11
Quote
Status: offline
beewee
Forum User
Full Member
Registered: 08/05/03
Posts: 969
Location:The Netherlands, where else?
In need to display topic-related banners. I´m using Open-X to manage my banners, and want to display a different bannercode for each topic below each separate story on mydomain.com/article.php/just-a-story.
That means I need to display the topic ID in article.thtml so I can use it as a parameter in OpenX. There is no template variable available for the topic ID in article.thtml at the moment.
Dutch Geeklog sites about camping/hiking:
www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
That means I need to display the topic ID in article.thtml so I can use it as a parameter in OpenX. There is no template variable available for the topic ID in article.thtml at the moment.
Dutch Geeklog sites about camping/hiking:
www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
9
10
Quote
Status: offline
Laugh
Site Admin
Admin
Registered: 09/27/05
Posts: 1475
Location:Canada
Around line 265 in article.php, after the line
$story_template->set_var('story_id', $story->getSid());
you could add the line
$story_template->set_var('topic_id', story->DisplayElements('tid'
);
You would then have to add in the {topid_id} tag to the article.html file.
This should work when geeklog displays the full article but I haven't tested it or anything.
One of the Geeklog Core Developers.
$story_template->set_var('story_id', $story->getSid());
you could add the line
$story_template->set_var('topic_id', story->DisplayElements('tid'

You would then have to add in the {topid_id} tag to the article.html file.
This should work when geeklog displays the full article but I haven't tested it or anything.
One of the Geeklog Core Developers.
15
9
Quote
Status: offline
suprsidr
Forum User
Full Member
Registered: 12/29/04
Posts: 555
Location:Champaign, Illinois
We simply made a different centerblock(top) for each topic we wanted banners to display in.
-s
FlashYourWeb and Your Gallery with the E2 XML Media Player for Gallery2 - http://www.flashyourweb.com
-s
FlashYourWeb and Your Gallery with the E2 XML Media Player for Gallery2 - http://www.flashyourweb.com
10
6
Quote
Status: offline
beewee
Forum User
Full Member
Registered: 08/05/03
Posts: 969
Location:The Netherlands, where else?
Quote by: suprsidr
We simply made a different centerblock(top) for each topic we wanted banners to display in.
-s
Yeah, me too, but I also need topic-related banners below each separate story. If they did not haver to be topic related, it would be enough to put the banner code in the bottom of article.thtml.
Dutch Geeklog sites about camping/hiking:
www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
15
9
Quote
Status: offline
beewee
Forum User
Full Member
Registered: 08/05/03
Posts: 969
Location:The Netherlands, where else?
Tested, and had to make a small change:
It works! Thanks guys! :banana:
Dutch Geeklog sites about camping/hiking:
www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
Text Formatted Code
$story_template->set_var('topic_id', $story->DisplayElements('tid'));It works! Thanks guys! :banana:
Dutch Geeklog sites about camping/hiking:
www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
10
10
Quote
Status: offline
beewee
Forum User
Full Member
Registered: 08/05/03
Posts: 969
Location:The Netherlands, where else?
Now a simple way to target the ads from OpenX to the topic ID:
First have a look over here (pdf tutorial). It´s quite simple:
- put the code above around line 265 in article.php
- make a fitting bannerzone
- go to ´invocation code´
- type {topic_id} in the textfield from the source parameter
- generate the invocation code and put this in layout/your_theme/article/article.thtml
- while uploading the banner, choose the ´Site-source´ delivery limitation at the Delivery Options, and put in the limitation you like...
Dutch Geeklog sites about camping/hiking:
www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
First have a look over here (pdf tutorial). It´s quite simple:
- put the code above around line 265 in article.php
- make a fitting bannerzone
- go to ´invocation code´
- type {topic_id} in the textfield from the source parameter
- generate the invocation code and put this in layout/your_theme/article/article.thtml
- while uploading the banner, choose the ´Site-source´ delivery limitation at the Delivery Options, and put in the limitation you like...
Dutch Geeklog sites about camping/hiking:
www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
14
11
Quote
All times are EDT. The time is now 02:27 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