Welcome to Geeklog Monday, August 19 2019 @ 12:12 pm EDT

Geeklog Forums

modifying article footers on index.php


Status: offline

tstockma

Forum User
Full Member
Registered: 22/07/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

Status: offline

knuff

Forum User
Full Member
Registered: 17/12/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.

PHP 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

PHP 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

Status: offline

Dirk

Site Admin
Admin
Registered: 12/01/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

Status: offline

tstockma

Forum User
Full Member
Registered: 22/07/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

Status: offline

tstockma

Forum User
Full Member
Registered: 22/07/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

Status: offline

knuff

Forum User
Full Member
Registered: 17/12/04
Posts: 340
Location:Sweden
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
Vanrillaer.com - our Family Portal

Status: offline

tstockma

Forum User
Full Member
Registered: 22/07/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

All times are EDT. The time is now 12:12 pm.

  • 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