TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,004
  • Total Topics: 21,330
  • Online today: 123
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 59
  • Total: 60
  • @rjen

Logic behind no "read more" link?

Started by ricland, July 31, 2007, 09:30:45 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ricland

Can someone explain to be the logic behind no "read more" links on forum articles that appear on the front page.

Clicking the title to read the rest of the article is not obvious.

ricland

carver

To add a "Read More " link back to the original post from the front page

open TPortal.php

Find:
$row['body'] .= '...';

and Replace with:
$row['body'] .= '<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0">  .... Read More</a>';

This will replace the  "..." at the end of a cut off post on the front page with a link back to the post if that is what you were asking..

gffb

Just a quick question this is such a user friendly feature will this be included in future releases of TP?

G6Cad



jayc7176

Is this possible on the New ? TP Beta.? Many Thanks

Zetan

Quote from: jayc7176 on June 23, 2008, 11:54:52 PM
Is this possible on the New ? TP Beta.? Many Thanks

Yes.

Did you? try it?

jayc7176

Yes ,ZTN   i did give it a go but

i Went Blind trying to locate in TPortal.php  :uglystupid2:

    $row['body'] .= '...';

But No luck found something similar but  not exact. 

May not there?

i even searched for ...  since these are displayed by default so i thought its gota be somewhere there. but i couldn't even find ... ( three dots )  in TPortal.php -- is it possible that now is handeled in a different file?


Also i was wondering if it was possible to add a Photo like a little Read More.gif?   instead of the words,  i would think that possible.. but m not that good with codeing :)


Many Thanks  :2funny:

Xarcell

Bloc is busy bug-squashing.

If anyone can figure out(out of my php scope) how to add the read more link to forum posts on frontpage, I'll see about adding it in for the next release.(with the ok from Bloc of course).

Zetan

Well, it definitely does work.. It's been happily working on >> my home page << for a long time (since TP 0.9.8 at least), and still is.

I've been looking through: /Sources/TPortal.php  and I can't find it either.


I never added it again after I upgraded to TP 1.0.5.. So, either the file never changed or it's added somewhere else. I'll do a bit more digging later.. I gotta go to work.

Xarcell

I tried adding it ZTN and it doesn't work.

There is no: $row['body'] .= '...';

But there is a: $row['body'] .= ''; I think this is it because it uses intro3, board news. However, anything I tried does not work. What do you have? Can you show me some of the code around yours so I can have a look-see?


jayc7176

What ZTN . !!   M jelous now - i was looking and looking but its no where,   if this is inbuilt Tp that would be iceing on the Cake.  did you uninstall the older TP before Installing - or you just did an upgrade? 


If this helps Look at my Front-Page after the word limit like i set it to 400 it still does show  . . .  ( three dots )  after that 400 word limit -- - which means it is pulling those from somewhere but shoot i can't find where from. 

Xarcell

@jay

mind posting a copy of your TPortal.php file?

Zetan

Quote from: jayc7176 on June 27, 2008, 02:06:08 AM
What ZTN . !!   M jelous now - i was looking and looking but its no where,   if this is inbuilt Tp that would be iceing on the Cake.  did you uninstall the older TP before Installing - or you just did an upgrade? 


If this helps Look at my Front-Page after the word limit like i set it to 400 it still does show  . . .  ( three dots )  after that 400 word limit -- - which means it is pulling those from somewhere but shoot i can't find where from. 

I don't think it's inbuilt.. I haven't had time to look. I'll have a look over the weekend.

Ianedres

In my 0.983 version*, looks like $txt['tp-readmore'] may be the language string (in TPortal.english.php) that contains the trailing tag you're looking for. May want to try finding that in TPortal.template.php.

* Can't get to my 1.05 site by FTP right now- argh!

Zetan

#15
Quote from: Ianedres on June 27, 2008, 07:45:23 AM
In my 0.983 version*, looks like $txt['tp-readmore'] may be the language string (in TPortal.english.php) that contains the trailing tag you're looking for. May want to try finding that in TPortal.template.php.

* Can't get to my 1.05 site by FTP right now- argh!

Agreed.. But.. Unless Bloc took the formatting from my site, I'm not sure it is.. I changed it to suit me. I didn't use the suggested .... Read More.

I used: ...[More]



You know.. sometimes it's just easier if somebody comes along and says.. "actually.. I did this, and thats why you can't find it"  :P

jayc7176

#16
@Xarcell    Here u go :)  Thanks mate


Xarcell

#17
I got it.

Open TPmodules.php

Find:
$row['body'] .= '...';

Replace With:
$row['body'] .= '<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0">' . $txt['tp-readmore'] . '</a>';

I'm currently looking into making it look better, and have articles "read more" and board news(frontpage forum posts) "read more" look uniform.

Xarcell

I don't think Bloc meant to remove it. As it was moved to a different file. I will add it to the next release, unless Bloc says otherwise.

Xarcell

#19
Which one of these working examples looks good for articles & board news "read more"?

Or would you rather see the read more link on the bottom right-hand corner of the post?

I'm open to suggestions as well.

EDIT: added bottom right hand corner screenshot.

Ken.

IMO the layout you show in readmore1.gif is better because having the "Read More" link positioned at the end of the displayed text leaves no doubt about the intent of the read more link.
" If everything seems under control, you're not going fast enough." - Mario Andretti
Yesterday When I was Young.

Zetan

Good catch Xarcell.. How mine is still working is a mystery. I'll have a nose in the morning.

Zetan

Quote from: Ken. on June 27, 2008, 09:34:20 PM
IMO the layout you show in readmore1.gif is better because having the "Read More" link positioned at the end of the displayed text leaves no doubt about the intent of the read more link.

I'm happy with a ...[More] link.. I don't see a need for unnecessary graphics.

I have to say..

I also think many of these touches, like Read More.. are a personal want. There are quite functional: Comments / Write Comment buttons already.. with: Comments doing exactly what Read More does.. It's just worded differently and located in a different place.

Xarcell

The more I think about it, the more I think it should just say "Read More". It could easily be changed in the language file if a person wanted something different.

What really should be done, besides adding the read more link, is make sure that the articles "read more" match the board news "read more" in terms of layout. Wouldn't you agree?

I think it's prudent to add "read more", because in alot of posts it doesn't look obvious that there is more to read.

jayc7176

#24
Thank you Thank you Thank u Xarcelllll! !!!   Thanks god you Found it   !  I love the 2nd Shot looks awsom.   Mission accomplished ! :)  If this could be added to TP would be good - wordpress and the rest allready have this  (so i m jelous)

xarcel is it possible to add an image right after Read more.?   so it will look like

..Read more





Mix it up with the old code - You can modifi the text with in  >:D


just change ...Anything »  to what ever you want it to say


in forum/Sources/TPmodules.php

Find:
Quote$row['body'] .= '...';


Replace with :
$row['body'] .= '<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0">...Anything » </a>';







Xarcell

Untested, but try:

$row['body'] .= '<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0">' . $txt['tp-readmore'] . ' <img src="', $settings['images_url'], '/icons/bullet003.gif" alt="" /></a>';

jayc7176

#26
I tried that X    got this Error     >:D


Parse error: syntax error, unexpected ',' in /home/jayc7176/public_html/forum/Sources/TPmodules.php on line 1502




Zetan

Quote from: Xarcell on June 28, 2008, 01:56:51 AM
The more I think about it, the more I think it should just say "Read More". It could easily be changed in the language file if a person wanted something different.

What really should be done, besides adding the read more link, is make sure that the articles "read more" match the board news "read more" in terms of layout. Wouldn't you agree?

I think it's prudent to add "read more", because in alot of posts it doesn't look obvious that there is more to read.


I agree.. which is why I added it to mine a while ago. I think having it the way it is with Comments | Add Comment should remain, as it displays a Comment Count. having an inline Read More suits me fine.

This website is proudly hosted on Crocweb Cloud Website Hosting.