Go Back   Pligg CMS Forum > Pligg Development > Modification Tutorials

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-05-2006, 02:41 AM
kbeeveer46's Avatar
Pligg Developer/Admin
Pligg Version: 0
Pligg Template: none
 
Join Date: Jun 2006
Location: Muncie, Indiana
Posts: 3,547
Thanks: 254
Thanked 649 Times in 513 Posts
NEW: "Read More" link after story summary

I finally got around to adding this to the Pligg code. The Published, Queued, and Top Stories pages now have a link that says "Read more" in case the summary gets cut off. The link directs you to the comments page where you can read the entire summary. I've attached a screen shot to show you what it looks like. Also, here's the official link where you can check out the files that were edited. Depending on your template you should only have to edit main.css and link_summary.tpl. http://pligg.svn.sourceforge.net/vie...v&revision=253
Attached Thumbnails
new-read-more-link-after-story-summary-untitled.jpg  
__________________
I accept donations for my time helping users like you on the forum and IRC.
Reply With Quote
The Following 10 Users Say Thank You to kbeeveer46 For This Useful Post:
  #2 (permalink)  
Old 11-05-2006, 04:15 AM
chuckroast's Avatar
Coder/Designer
Pligg Version: 1.0
Pligg Template: ExpertVision
 
Join Date: Jun 2006
Location: PA
Posts: 2,399
Thanks: 171
Thanked 439 Times in 278 Posts
Great Job KB..
__________________
Visit PliggPro the official Pligg Mods & Template Shop!

Reply With Quote
  #3 (permalink)  
Old 11-05-2006, 10:26 AM
Constant Pligger
 
Join Date: Oct 2006
Posts: 227
Thanks: 56
Thanked 22 Times in 18 Posts
Is there any code we could wrap around this to only make it add the read more link if the story has been truncated?
Reply With Quote
  #4 (permalink)  
Old 11-06-2006, 01:19 PM
New Pligger
 
Join Date: Nov 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
This is my first post: horray!

Just installed pligg and love it. Unfortunately this mod produced a SQL error (booo!):

Quote:
SQL/DB Error -- [Table 'tennisvo_pligg.table_links' doesn't exist]

Fatal error: Call to a member function on a non-object in /home/tennisvo/public_html/libs/link.php on line 308


Check out our site if you get a chance: www.tennisvote.com


Thanks
Reply With Quote
  #5 (permalink)  
Old 11-06-2006, 01:36 PM
kbeeveer46's Avatar
Pligg Developer/Admin
Pligg Version: 0
Pligg Template: none
 
Join Date: Jun 2006
Location: Muncie, Indiana
Posts: 3,547
Thanks: 254
Thanked 649 Times in 513 Posts
lynnlovestennis, make sure you don't copy the entire link.php. Click on the words "text changed" and it will show you what to add. The rest of the link.php will not work with 8.2 because we've made a lot of changes.
__________________
I accept donations for my time helping users like you on the forum and IRC.
Reply With Quote
  #6 (permalink)  
Old 11-06-2006, 04:50 PM
New Pligger
 
Join Date: Nov 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Ah, space. The final frontier. It's funny, I totally did that for the css file too...


Lesson: Don't attempt to cut and paste while high on goofballs.




Thanks dude. You.rock.hard.

Last edited by lynnlovestennis; 11-06-2006 at 05:15 PM..
Reply With Quote
  #7 (permalink)  
Old 11-21-2006, 04:42 AM
New Pligger
 
Join Date: Nov 2006
Posts: 15
Thanks: 3
Thanked 0 Times in 0 Posts
I implemented the pligg code from http://pligg.svn.sourceforge.net/vie...v&revision=253 and it works fine for the Published page where it adds "read more" at the end of each summary. However, it does not do that in the Top Stories page. Did I miss something?
Reply With Quote
  #8 (permalink)  
Old 11-23-2006, 12:21 AM
New Pligger
 
Join Date: Nov 2006
Posts: 25
Thanks: 12
Thanked 1 Time in 1 Post
anyone figure out how to add the "read more" only if a story is truncated?
Reply With Quote
  #9 (permalink)  
Old 11-23-2006, 03:19 AM
New Pligger
 
Join Date: Nov 2006
Posts: 15
Thanks: 3
Thanked 0 Times in 0 Posts
Actually I found my problem: in file link_summary.tpl I changed line 109 from

{$story_content} {if $pagename eq "shakeit" || $pagename eq "index"} <a href="{$story_url}" class="morelink">read more</a> {/if}<br />

to

{$story_content} {if $pagename eq "shakeit" || $pagename eq "index" || $pagename eq "topstories"} <a href="{$story_url}" class="morelink">... read more</a> {/if}<br />

That did the trick.
Reply With Quote
  #10 (permalink)  
Old 12-01-2006, 04:55 PM
New Pligger
 
Join Date: Nov 2006
Posts: 13
Thanks: 0
Thanked 1 Time in 1 Post
"read more" only if truncated

Quote:
Originally Posted by mBeat View Post
anyone figure out how to add the "read more" only if a story is truncated?
I am looking into it, however, it looks somewhat complicated since you have to pass the truncated/not truncated information to the template.
Reply With Quote
Reply

Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
"Read more" link = 404 error Divisive Cotton General Help 3 07-05-2008 03:47 AM
How to direct story title in summary page to the original story? chris79 General Help 4 02-03-2008 07:28 PM
"read more" link -- what file? jamfull General Help 3 01-31-2008 11:51 AM
Link to Story after or during Submit dattard General Help 1 12-31-2007 03:27 AM
Why is the "Read more" link active when there's nothing more to read? nothingman Off-topic 0 09-12-2007 01:15 PM


Search Engine Friendly URLs by vBSEO 3.2.0