| Author |
Message |
scottdallas

Joined: 04 May 2006 Posts: 1843 Location: US |
|
|
|
 |  | 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 In other words, your creativity will not go unnoticed.
_________________ www.scottdizzle.com uses cnr
last update: 07-22-08: 8:30 pm |
|
| Thu Jan 10, 2008 12:52 pm |
|
 |
Guest
|
|
|
Please login to hide the ads.
|
|
|
|
 |
marcusmagalhaes
Joined: 24 Apr 2007 Posts: 70
|
|
URGENT!!!!!!! |
|
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 |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2736 Location: Germany |
|
|
|
Open the file and find this:
 |  | preg_match('/{sShortStory\|(\d+)}/i', $output, $temp); |
add below:
 |  | $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 |
|
 |
alven
Joined: 05 Jul 2006 Posts: 126
|
|
|
|
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 |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2736 Location: Germany |
|
|
|
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 |
|
 |
alven
Joined: 05 Jul 2006 Posts: 126
|
|
|
|
Thanks a lot FI-DD.
|
|
| Thu Mar 06, 2008 10:13 pm |
|
 |
marcusmagalhaes
Joined: 24 Apr 2007 Posts: 70
|
|
|
|
not working... the image not show .... I want show image, but not count characters..
 |  | Open the file and find this:
 |  | preg_match('/{sShortStory\|(\d+)}/i', $output, $temp); |
add below:
 |  | $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 |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2736 Location: Germany |
|
|
|
Try this:
Change this:
 |  | 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:
 |  | 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 |
|
 |
marcusmagalhaes
Joined: 24 Apr 2007 Posts: 70
|
|
|
|
not work yet....
I'm try .... but..... not working..
thanks
|
|
| Thu Jun 05, 2008 3:18 pm |
|
 |
nolikewise
Joined: 17 Dec 2007 Posts: 64
|
|
|
|
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 |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2736 Location: Germany |
|
|
|
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 |
|
 |
|