Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
short.ShortStory
Goto page Previous  1, 2
 
Reply to topic    Forum Index » Additional Downloads View previous topic
View next topic
short.ShortStory
Author Message
scottdallas



Joined: 04 May 2006
Posts: 1843
Location: US

Post Reply with quote
Quote:
If you allow me, I could "re"make the plugin, to make short the fullstory (the advantadge of this, is that you only have to write one story, the full one, and then it gets "shriked" by the plugin) and post it here.

Of course, your name will be on it.


I suggest making your plugin, adding it to the 'Additional Downloads', describing what it does and why it's useful and seeing if anyone complains that you did Laughing Razz In other words, your creativity will not go unnoticed.

_________________
www.scottdizzle.com uses cnr Smile
last update: 07-22-08: 8:30 pm
Thu Jan 10, 2008 12:52 pm View user's profile Send private message Visit poster's website AIM Address
Guest








Please login to hide the ads.

marcusmagalhaes



Joined: 24 Apr 2007
Posts: 70

Post URGENT!!!!!!! Reply with quote
Hi Fi-DD

the short story is even counting the numbers of images link (<img width="70" height="53" border="0" align="left" alt="" style="width: 70px; height: 53px;" src="/XXXX/XXX/XXX/XXX/XXX/ic_camara.gif" />), can we exclude the images link from the count?
Wed Feb 27, 2008 1:36 am View user's profile Send private message
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2736
Location: Germany

Post Reply with quote
Open the file and find this:
Code:
preg_match('/{sShortStory\|(\d+)}/i', $output, $temp);


add below:
Code:
$row['short'] = preg_replace("/<img[^>]+\>/is", "", $row['short']);


P.S.: Please don't send me your questions via PM if you already posted it here.
Wed Feb 27, 2008 7:53 pm View user's profile Send private message
alven



Joined: 05 Jul 2006
Posts: 126

Post Reply with quote
Super FI-DD nice solution so can we solve this with the plugin Auto short story that Creates short story from the full story?
Thanks in advance.
Thu Mar 06, 2008 1:18 pm View user's profile Send private message
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2736
Location: Germany

Post Reply with quote
Come on, that's so easy. Did you even try to solve it yourself?

Simply use the code from above and replace $row['short'] with $short_story.
Thu Mar 06, 2008 8:12 pm View user's profile Send private message
alven



Joined: 05 Jul 2006
Posts: 126

Post Reply with quote
Thanks a lot FI-DD.
Thu Mar 06, 2008 10:13 pm View user's profile Send private message
marcusmagalhaes



Joined: 24 Apr 2007
Posts: 70

Post Reply with quote
not working... the image not show .... I want show image, but not count characters..

FI-DD wrote:
Open the file and find this:
Code:
preg_match('/{sShortStory\|(\d+)}/i', $output, $temp);


add below:
Code:
$row['short'] = preg_replace("/<img[^>]+\>/is", "", $row['short']);


P.S.: Please don't send me your questions via PM if you already posted it here.

Wed Apr 09, 2008 5:12 pm View user's profile Send private message
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2736
Location: Germany

Post Reply with quote
Try this:

Change this:
Code:
preg_match('/{sShortStory\|(\d+)}/i', $output, $temp);
   $output = preg_replace('/{sShortStory\|(\d+)}/i', strlen($row['short']) > $temp[1] ? substr($row['short'], 0, $temp[1]).'...' : $row['short'], $output);


to this:
Code:
preg_match('/{sShortStory\|(\d+)}/i', $output, $temp);
   $short_tmp = preg_replace("/<img[^>]+\>/is", "", $row['short']);
   $output = preg_replace('/{sShortStory\|(\d+)}/i', strlen($short_tmp) > $temp[1] ? substr($row['short'], 0, $temp[1]).'...' : $row['short'], $output);

Wed Apr 09, 2008 5:44 pm View user's profile Send private message
marcusmagalhaes



Joined: 24 Apr 2007
Posts: 70

Post Reply with quote
not work yet....

I'm try .... but..... not working..

thanks
Thu Jun 05, 2008 3:18 pm View user's profile Send private message
nolikewise



Joined: 17 Dec 2007
Posts: 64

Post Reply with quote
when you edit e message it does not function but when you add a new one it is okay...

fi-dd have a look pls...
Tue Jul 22, 2008 5:52 pm View user's profile Send private message
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2736
Location: Germany

Post Reply with quote
This plugin is called when the news are shown. Then it truncates the short story to the given number of characters.

So it shouldn't matter whether you add or edit an article.

In your case it could be a cache problem. Clear the cache and try again.
Tue Jul 29, 2008 5:43 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    Forum Index » Additional Downloads All times are GMT + 1 Hour
Goto page Previous  1, 2
Page 2 of 2

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum



Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Music Lyrics.