Welcome to Geeklog, Anonymous Thursday, March 28 2024 @ 07:31 am EDT

Geeklog Forums

modifying article footers on index.php


Status: offline

tstockma

Forum User
Full Member
Registered: 07/22/03
Posts: 169
I hope I haven't missed something silly, but I've really looked thru the code and haven't answered my question.

My site is for news articles, mostly, and I'm making careful use of the Intro Text vs the Body Text fields. Almost every article I post has lots more in the body text.

But my visitors aren't usually very sophisticated, they're not realizing that "read more" brings up more of my article and almost always some external links.

So I want to add something like "view full article: " in plain text in front of the "read more" link.

Where can I find the code that produces the "read more" link? I've been thru articles.php and have ID'd the area of code that procudes this, but it appears it's in called functions and I'm at a loss...

Any hints or direct instructions would be much appreciated!
Tom
www.southparkcity.com
 Quote

Status: offline

knuff

Forum User
Full Member
Registered: 12/17/04
Posts: 340
Location:Sweden
Hi,

Two quick ways to do this.

One: Just translate the read more into view full article in the language file which is english.php for you.

Just pay attention to the quotes.

Text Formatted Code

$LANG01 = array(
    1 => 'Contributed by:',
    2 => 'read more',


 


Option 2.

Change the template.

You will find this in featuredstorytext.thtml, storytext.thtml and archivetorytext.thtml

Just look for

Text Formatted Code
<tr><td align="center">{edit_link}<br>
                                                          {readmore_link} {start_comments_anchortag}{comments_text}{end_comments_anchortag}<br>
{recent_post_anchortag}<br></td></tr>
 



and add your text before readmore_link


Best Regards,
Boris
Vanrillaer.com - our Family Portal
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by tstockma: Where can I find the code that produces the "read more" link?

system/lib-story.php

bye, Dirk
 Quote

Status: offline

tstockma

Forum User
Full Member
Registered: 07/22/03
Posts: 169
Thanks, everyone, this gives me all kinds of places to explore, and I'll get right on it!

Tom
Tom
www.southparkcity.com
 Quote

Status: offline

tstockma

Forum User
Full Member
Registered: 07/22/03
Posts: 169
Interesting--Boris, I tried your solution in the .thtml files first, as it looked simpler than working on the php--seemed to work like a champ!

Until I viewed the full article, and the text also showed up there.

But I got to learn more! I'm learning more all the time...


Dirk, this was of course simply inserting a few words into a single line in the lib-story.php file.

Thanks to both of you! It now looks & works terrific.
Tom
www.southparkcity.com
 Quote

Status: offline

knuff

Forum User
Full Member
Registered: 12/17/04
Posts: 340
Location:Sweden
Doh! - that was a mistake correct that thtml is called by both and dynamicly generated.

Changing the language should work also as $LANG01[2] is only called in lib-story.php and that way you don´t need to modify lib-story.php, unless I am mistaken here too Mr. Green
Vanrillaer.com - our Family Portal
 Quote

Status: offline

tstockma

Forum User
Full Member
Registered: 07/22/03
Posts: 169
My perception--tell me if I'm wrong!--is that the entry in the language file "read more" is exactly what gets turned into the link text.

What I wanted & ended up with is this:

Full article & links: read more

Where only "read more" remained the link. I'm hoping I can train my user base into realizing a "read more" link means there's more to the article they haven't seen.

Have I got it right? Good suggestion...I probably should've just changed "read more" into "full article and links"...

Thanks again for all the help! It's an amazing learning process. --Tom
Tom
www.southparkcity.com
 Quote

All times are EDT. The time is now 07:31 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