auto-recognition of hyperlinks in story text

Register an Account
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 05-27-2007, 06:04 PM
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,042
I need auto-recognition of hyperlinks for editorials. It works with comments so could you please tell me where this code for comments is and where I have to copy it to make it running with story texts?

Thank you!
Reply With Quote
  #2 (permalink)  
Old 05-29-2007, 12:20 PM
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,042
Guess it´s function text_to_html($string) of libs/utils.php but I don´t know where to put it in.
Reply With Quote
  #3 (permalink)  
Old 05-30-2007, 04:00 AM
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,042
I would really appreciate help for this topic! [done]

Furthermore, some hints regarding those threads with descending priority would be fine:

1. Localization bugs [done]

2. Tag cloud in a new window [done]

2. v9.5 Live view: votes miscalculated [done]

3. Pligg + OpenID [pending]

Last edited by tbones; 08-08-2007 at 04:11 AM. Reason: thank you savant and beatniak
Reply With Quote
  #4 (permalink)  
Old 05-30-2007, 05:58 AM
savant's Avatar
Constant Pligger
 
Join Date: Apr 2006
Location: UK
Posts: 1,181
i think we're getting affected by kb not being around that often.

First you should post the version of pligg as when we post code it might be for a different version than yours and can cause more errors.

to convert text to links.

in /libs/link.php

find

PHP Code:
        if($type == "summary"){
            if(
$this->link_summary == ""){
                
$smarty->assign('story_content'$this->truncate_content());
            } else {
                
$smarty->assign('story_content'$this->link_summary);
            }
        }
        if(
$type == "full"){
            
$smarty->assign('story_content'$this->content);
        } 
replace with

PHP Code:
        if($type == "summary"){
            if(
$this->link_summary == ""){
                
$smarty->assign('story_content'text_to_html($this->truncate_content()));
            } else {
                
$smarty->assign('story_content'text_to_html($this->link_summary));
            }
        }
        if(
$type == "full"){
            
$smarty->assign('story_content'text_to_html($this->content));
        } 
please backup your files before making any changes.
Reply With Quote
  #5 (permalink)  
Old 05-30-2007, 09:26 AM
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,042
Thank you for your help so far!
Your right, I should state my version which is 9.5. Maybe the forum can be adapted in a way that the current version is displayed under the name of the forum member.

If it´s not my version than it´s maybe a declaration problem that caused the error message after changinig the code:
Parse error: syntax error, unexpected T_CLASS, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /srv/www/www-netbi-blog/http/blog/bewertung/libs/link.php on line 930
Reply With Quote
  #6 (permalink)  
Old 05-30-2007, 10:02 AM
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,042
Quote:
Originally Posted by tbones View Post
If itīs not my version than itīs maybe a declaration problem that caused the error message after changinig the code:
Parse error: syntax error, unexpected T_CLASS, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /srv/www/www-netbi-blog/http/blog/bewertung/libs/link.php on line 930
Donīt know why but it isnīt there anymore! ;-)
Reply With Quote
  #7 (permalink)  
Old 01-04-2008, 03:58 PM
Casual Pligger
Pligg Version: 9.5
Pligg Template: yget modified
 
Join Date: Apr 2007
Posts: 43
Hi,
i would like to use this also for my editorials in pligg 9.7. I've replaced the code mentioned above, but it didn't work!?
Any ideas? TY!
DR
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Flowing story text around AdSense box lancey Questions and Comments 10 03-07-2009 05:04 PM
New story gets auto discarded with zero votes envieme Questions and Comments 4 11-19-2008 09:14 PM
Add text ads to story content area knuckle05 Questions and Comments 5 11-01-2007 10:27 PM
Story status change text pligger2 Questions and Comments 2 01-16-2007 03:32 PM
Changing the "white space" on both sides of the story post text buttercup Questions and Comments 3 07-15-2006 02:33 AM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development