Welcome to Geeklog, Anonymous Wednesday, November 27 2024 @ 05:45 am EST
Geeklog Forums
topic name link without topic icon
Status: offline
zing
Forum User
Newbie
Registered: 04/03/05
Posts: 2
Location:Anguilla, Caribbean
Very impressed with Geeklog. Thanks for all the effort.
Problem: I want the topic name links in each story, but not the topic icon images.
In Firefox, if I want to have a topic link on each story, I just remove the configured image for each topic. but in Internet Explorer 6, this makes a broken image link.
My beta test site is at http://azuvilla.com/sites/anguilla (I want to use geeklog for this existing blog: http://news.ai/daily.php3).
here is the template code that i put into story.thtml:
<b>{story_anchortag_and_image}</b>
and here is the html code that is generated from story.thml
<b><a href="http://azuvilla.com/sites/anguilla//index.php?topic=art"><img align="right" src="http://azuvilla.com/sites/anguilla//images/icons/" alt="Art" title="Art" border="0"></a></b>
Notice that there is an img tag to the img directory, even though there is not an img file name. This is because the topic config screen has "/images/icons/" in the image field.
So, I would have to create a topic icon image for every topic if I want topic links on stories.
I studied lib-story.php and then tried using the (story_topic_name) and and (story_topic_url) variables in the story.thmtl, but they were not processed (I just got a link with "(story_topic_name)" as the link.
Here is the code that I tried in story.thmlt:
<a href="(story_topic_url)">(story_topic_name)</a>
I don't notice any differences between story_topic_name and story_anchortag_and_image in lib-story.php, but I am
obviously missing something. Here is part of the original code from lib-story-php :
$article->set_var( 'story_topic_name', $topicname );
if( $_USER['noicons'] != 1 AND $A['show_topic_icon'] == 1 )
{
$topicurl = $_CONF['site_url'] . '/index.php?topic=' . $A['tid'];
if( !empty( $A['imageurl'] ))
{
if( isset( $_THEME_URL ))
{
$imagebase = $_THEME_URL;
}
else
{
$imagebase = $_CONF['site_url'];
}
$topicimage = '<img align="' . $_CONF['article_image_align']
. '" src="' . $imagebase . $A['imageurl'] . '" alt="'
. $topicname . '" title="' . $topicname . '" border="0">';
$article->set_var( 'story_anchortag_and_image', '<a href="'
. $topicurl . '">' . $topicimage . '</a>' );
$article->set_var( 'story_topic_image', $topicimage );
}
$article->set_var( 'story_topic_url', $topicurl );
}
how do I figure out which of these $article variables are exported to the template and which are not?
See also this forum post about removing the topic icon. It does not comflict with my experience
http://www.geeklog.net/forum/viewtopic.php?forum=3&showtopic=38240
Thanks for any suggestions.
p.s. sorry for the lack of indenation, but I used text mode so I could put in the html code as a literal
Problem: I want the topic name links in each story, but not the topic icon images.
In Firefox, if I want to have a topic link on each story, I just remove the configured image for each topic. but in Internet Explorer 6, this makes a broken image link.
My beta test site is at http://azuvilla.com/sites/anguilla (I want to use geeklog for this existing blog: http://news.ai/daily.php3).
here is the template code that i put into story.thtml:
<b>{story_anchortag_and_image}</b>
and here is the html code that is generated from story.thml
<b><a href="http://azuvilla.com/sites/anguilla//index.php?topic=art"><img align="right" src="http://azuvilla.com/sites/anguilla//images/icons/" alt="Art" title="Art" border="0"></a></b>
Notice that there is an img tag to the img directory, even though there is not an img file name. This is because the topic config screen has "/images/icons/" in the image field.
So, I would have to create a topic icon image for every topic if I want topic links on stories.
I studied lib-story.php and then tried using the (story_topic_name) and and (story_topic_url) variables in the story.thmtl, but they were not processed (I just got a link with "(story_topic_name)" as the link.
Here is the code that I tried in story.thmlt:
<a href="(story_topic_url)">(story_topic_name)</a>
I don't notice any differences between story_topic_name and story_anchortag_and_image in lib-story.php, but I am
obviously missing something. Here is part of the original code from lib-story-php :
$article->set_var( 'story_topic_name', $topicname );
if( $_USER['noicons'] != 1 AND $A['show_topic_icon'] == 1 )
{
$topicurl = $_CONF['site_url'] . '/index.php?topic=' . $A['tid'];
if( !empty( $A['imageurl'] ))
{
if( isset( $_THEME_URL ))
{
$imagebase = $_THEME_URL;
}
else
{
$imagebase = $_CONF['site_url'];
}
$topicimage = '<img align="' . $_CONF['article_image_align']
. '" src="' . $imagebase . $A['imageurl'] . '" alt="'
. $topicname . '" title="' . $topicname . '" border="0">';
$article->set_var( 'story_anchortag_and_image', '<a href="'
. $topicurl . '">' . $topicimage . '</a>' );
$article->set_var( 'story_topic_image', $topicimage );
}
$article->set_var( 'story_topic_url', $topicurl );
}
how do I figure out which of these $article variables are exported to the template and which are not?
See also this forum post about removing the topic icon. It does not comflict with my experience
http://www.geeklog.net/forum/viewtopic.php?forum=3&showtopic=38240
Thanks for any suggestions.
p.s. sorry for the lack of indenation, but I used text mode so I could put in the html code as a literal
10
9
Quote
Status: offline
zing
Forum User
Newbie
Registered: 04/03/05
Posts: 2
Location:Anguilla, Caribbean
andy mahoney gave me the answer. thanks.
i needed curly braces instead of parentheses. perhaps this is a case where a little documentation would have helped after all, since my eyes obviously could not see the difference
{story_topic_name}
this gives a link in the story to the current topic, without icon image files (and it works on IE and Firefox).
and this makes me think that any $article varialbes that are set in the php
files can probably be used in the template.
i needed curly braces instead of parentheses. perhaps this is a case where a little documentation would have helped after all, since my eyes obviously could not see the difference
{story_topic_name}
this gives a link in the story to the current topic, without icon image files (and it works on IE and Firefox).
and this makes me think that any $article varialbes that are set in the php
files can probably be used in the template.
8
9
Quote
Status: offline
drshakagee
Forum User
Full Member
Registered: 10/01/03
Posts: 231
Status: Banned
machinari
Forum User
Full Member
Registered: 03/22/04
Posts: 1512
nothin.. don't mind me
9
9
Quote
All times are EST. The time is now 05:45 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