Posted on: 06/16/04 11:34pm
By: RickW
I would like to modify the "read more" link to say "Read More: The Title of the Story" and have it be bold. It's inconspicuous right now.
How do I do this?
Change "read more" link to something more descriptive
Posted on: 06/17/04 01:34am
By: Robin
First look into english.php and find "read more" and change it to Read More:.
Then I'd say you need to modify a storytext.thtml, of the layout of yours. Find {readmore_link} add {story_title} right after it embrace it with bold tags. Let me know if it works.
Change "read more" link to something more descriptive
Posted on: 06/17/04 07:26am
By: Anonymous (RickW)
[QUOTE BY= Robin] First look into english.php and find "read more" and change it to Read More:.
Then I'd say you need to modify a storytext.thtml, of the layout of yours. Find {readmore_link} add {story_title} right after it embrace it with bold tags. Let me know if it works.[/QUOTE]
Close but didn't work.
If I put {story_title} in storytext.thtml, it's not within the link anchor - plus if there isn't any more story to read, it still shows up. So I tried putting {story_title} into the {readmore_link} text in English.php. Doesn't seem to work. Also tried {$story_title} because I saw some other variables used as such but nope.
Any other ideas?
Change "read more" link to something more descriptive
Posted on: 06/17/04 07:53am
By: Dirk
Change "read more" link to something more descriptive
Posted on: 06/17/04 09:32am
By: Robin
[QUOTE BY= RickW]Close but didn't work.
Any other ideas?[/QUOTE]
Ok forget the first solution. Check
here[*2] if that's what you had in mind.
Change "read more" link to something more descriptive
Posted on: 06/17/04 09:43am
By: Anonymous (RickW)
[QUOTE BY= RickW] [QUOTE BY= Robin] First look into english.php and find "read more" and change it to Read More:.
Then I'd say you need to modify a storytext.thtml, of the layout of yours. Find {readmore_link} add {story_title} right after it embrace it with bold tags. Let me know if it works.[/QUOTE]
Close but didn't work.
If I put {story_title} in storytext.thtml, it's not within the link anchor - plus if there isn't any more story to read, it still shows up. So I tried putting {story_title} into the {readmore_link} text in English.php. Doesn't seem to work. Also tried {$story_title} because I saw some other variables used as such but nope.
Any other ideas?[/QUOTE]
Well it's a little better now - still not 100% what I want but it will do for now. The solution was to use {readmore_link}{start_readmore_anchortag}{story_title}{end_readmore_anchortag} in storytext.thtml.
Had to still ues the readmore_link because if I entered just the text it would show up even if there wasn't more to read. Plus if there isn't more to read, I still end up with the story_title showing up but I guess I'll let that go.
Change "read more" link to something more descriptive
Posted on: 06/17/04 09:46am
By: Anonymous (RickW)
[QUOTE BY= Robin] [QUOTE BY= RickW]Close but didn't work.
Any other ideas?[/QUOTE]
Ok forget the first solution. Check
here[*2] if that's what you had in mind.[/QUOTE]
Yes, but does that work if you don't have any body text?
Change "read more" link to something more descriptive
Posted on: 06/17/04 10:27am
By: Robin
[QUOTE BY= RickW]Yes[/QUOTE]
OK. Here's what you need to do:
1. Edit your lib-common.php (but first back it up) and find this bit:
$article->set_var( 'readmore_link', '<a href="' . $articleUrl . '">'
. $LANG01[2] . '</a> (' . $numwords . ' ' . $LANG01[62]
. ') ' );
2. Highlight it and overwrite with this bit:
//readmore + story title hack
$article->set_var( 'readmore_link', '<a href="' . $articleUrl . '">
' . $LANG01[2] . '</a> ' );
$article->set_var( 'readmore_link_title', '<a href="' . $articleUrl . '">
' . $A['title'] . '</a> (' . $numwords . ' ' . $LANG01[62]
. ') ' );
//readmore + story title hack
3. Save your lib-common.php
4. Edit english.php and change read more into e.g. Read More:
5. Edit storytext.thtml and after {readmore_link) add this bit
{readmore_link_title}. Embrace them with bold tags.
6. Save all files
6. Enjoy the hack.
Change "read more" link to something more descriptive
Posted on: 06/17/04 12:04pm
By: Anonymous (RickW)
[QUOTE BY= Robin] [QUOTE BY= RickW]Yes[/QUOTE]
OK. Here's what you need to do:
1. Edit your lib-common.php (but first back it up) and find
$article->set_var( 'readmore_link', '<a href="' . $articleUrl . '">'
. $LANG01[2] . '</a> (' . $numwords . ' ' . $LANG01[62]
. ') ' );
2. Highlight it and overwrite with this bit:
//readmore + story title hack
$article->set_var( 'readmore_link', '<a href="' . $articleUrl . '">
' . $LANG01[2] . '</a> ' );
$article->set_var( 'readmore_link_title', '<a href="' . $articleUrl . '">
' . $A['title'] . '</a> (' . $numwords . ' ' . $LANG01[62]
. ') ' );
//readmore + story title hack
3. Save your lib-common.php
4. Edit english.php and change read more into e.g. Read More:
5. Edit storytext.thtml and after {readmore_link) add this bit
{readmore_link_title}. Embrace them with bold tags.
6. Save all files
6. Enjoy the hack. [/QUOTE]this bit:
This hack should become a permanent change in the Geeklog distribution.
thanks for your help!
Change "read more" link to something more descriptive
Posted on: 06/17/04 02:13pm
By: jnordquist
What site is this working on? I'd really like to see this. Thanks!
Change "read more" link to something more descriptive
Posted on: 06/17/04 02:41pm
By: Anonymous (RickW)
[QUOTE BY= jnordquist] What site is this working on? I'd really like to see this. Thanks!
[/QUOTE]
here[*3]
I'm still using my first result, maybe tonight I'll follow Robin's instructions to clean it up.
Change "read more" link to something more descriptive
Posted on: 06/17/04 04:29pm
By: Robin
[QUOTE BY= jnordquist] What site is this working on? I'd really like to see this. Thanks![/QUOTE]
E.g.
here[*4]
Change "read more" link to something more descriptive
Posted on: 06/18/04 10:41am
By: Anonymous (RickW)
Okay now a new question. Still on the theme of using the variables though.
In my header I want to use:
<META NAME="keywords" CONTENT="{story_topic_name}, antivirus, spam, computer virus, email filtering, virus scanning">
<META NAME="description" CONTENT="{story_topic_name}: {story_title}">
Per the GL Doc, those variables are only available in the story files. Is there anything I can do to reference them?
A suggestion for Geeklog2, if you guys can add a Keywords field to stories, so I can enter "antivirus, symantec, virus signatures" or whatever pertains to the article - then this field could be referenced by a variable called "meta_keywords". The What's Related block could also cross reference this field with other articles, or have a seperate block called Related Articles.
In fact it would be nice if there was a set of meta variables. meta_keywords, meta_description, meta_abstract, meta_author, meta_revisit, meta_rating, etc. usable in the header file.
Change "read more" link to something more descriptive
Posted on: 06/18/04 03:38pm
By: Robin
[QUOTE BY= RickW]In fact it would be nice if there was a set of meta variables. meta_keywords, meta_description, meta_abstract, meta_author, meta_revisit, meta_rating, etc. usable in the header file.
[/QUOTE]
Correct me if I'm wrong, you're worried about pages indexing. From experience I can tell (beats me why) but Geeklog sites are getting indexed so well that you'd never believe.
E.g. I put an example ad on my site. A picture of Henri Cartier Bresson. The other day I was checking the referrers and there was a query on Google looking for "Henri Cartier Bresson" to my surprise my site was on the third place. See
here[*5] .
For example my site is No. 1 in Google under Geeklog (this is of course for Polish language only)
Change "read more" link to something more descriptive
Posted on: 06/18/04 04:12pm
By: Anonymous (RickW)
[QUOTE BY= Robin] [QUOTE BY= RickW]In fact it would be nice if there was a set of meta variables. meta_keywords, meta_description, meta_abstract, meta_author, meta_revisit, meta_rating, etc. usable in the header file.
[/QUOTE]
Correct me if I'm wrong, you're worried about pages indexing. From experience I can tell (beats me why) but Geeklog sites are getting indexed so well that you'd never believe.
E.g. I put an example ad on my site. A picture of Henri Cartier Bresson. The other day I was checking the referrers and there was a query on Google looking for "Henri Cartier Bresson" to my surprise my site was on the third place. See
here[*5] .
For example my site is No. 1 in Google under Geeklog (this is of course for Polish language only)[/QUOTE]
There are more search engines besides Google. Also if you have a meta description tag then Google uses that in the search results.
Change "read more" link to something more descriptive
Posted on: 06/30/05 05:55pm
By: Anonymous (Wayne)
{readmore_link_title}. Embrace them with bold tags.
For some reason this is not working for me. I did not make all the changes above as all I wanted to do was change "read more" to "
read more" in bold.
I used:
<b>{readmore_link}</b>
Yet I still see it in plain non bold for some reason. I also removed the center tag to have it left justify by default and yet it's still centered. Here is the code with my changes:
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="100%" class="story-title"><img src="{site_url}/images/speck.gif" width="1" height="0" alt=""><h2><a href="{article_url}" class="non-ul">{story_title}</a></h2></td>
<td class="story-title" width="5%" align="right" nowrap> {email_icon} {print_icon} {pdf_icon}</td>
</tr>
<tr>
<td class="story-box" colspan="2"><table border="0" cellpadding="3" cellspacing="0" width="100%"><tr><td class="story-information" width="100%">{story_date}<br>{lang_contributed_by} {start_contributedby_anchortag}{contributedby_user}{end_contributedby_anchortag}<br>{lang_views}: {story_hits}</td></tr>
<tr>
<td>
<p>{story_anchortag_and_image}{story_introtext}</p>
</td></tr></table>
<table border="0" cellpadding="3" cellspacing="0" width="100%">
<tr>{edit_link}<br>
<b>{readmore_link}</b>{start_comments_anchortag}{comments_text}{end_comments_anchortag}<br>
{recent_post_anchortag}<br></tr>
</table></td>
</tr>
</table>
<table cellspacing="0" cellpadding="0" align="center" width="100%" class="block-divider"><tr><td><img src="{site_url}/images/speck.gif" width="1" height="2" alt=""></td></tr></table>
Any thoughts?
Change "read more" link to something more descriptive
Posted on: 06/30/05 06:00pm
By: Anonymous (Wayne)
disregard the above, it's working, it just does not work with the featured article for some reason.
Change "read more" link to something more descriptive
Posted on: 06/30/05 08:30pm
By: matthewcox
[QUOTE BY= Wayne] disregard the above, it's working, it just does not work with the featured article for some reason.[/QUOTE]
Wayne,
Don't forget, whatever changes you made to storytext.thtml should also be made to featuredstorytext.thtml
Same goes for storybodytext.thtml -> featuredstorybodytext.thtml
-
Matthew Cox[*6]