Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
Auto short story

 
Reply to topic    Forum Index » Additional Downloads View previous topic
View next topic
Auto short story
Author Message
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2801
Location: Germany

Post Auto short story Reply with quote
Automatically creates the short story from the full story.

By default the short story will show 100 characters.



Installation:

1. Open auto-short-story and change $max = 100; as you like.

2. Upload the plugin to plugins/ folder and activate it.

3. Open skins/cute.js and replace this:

Code:
      elem.name == "short_story"

   || elem.name == "poster"




with this:

Code:
      elem.name == "poster"




auto-short-story.zip
 Description:
Auto short story

Download
 Filename:  auto-short-story.zip
 Filesize:  453 Bytes
 Downloaded:  552 Time(s)

Sun Feb 19, 2006 11:20 pm View user's profile Send private message
Guest








Please login to hide the ads.

flyboy17



Joined: 21 Feb 2007
Posts: 49

Post Reply with quote
It's a great plugin.

But when I add a text and leave the 'short story' field empty, I still get a warning that the 'short story must contain a value'.
Mon Apr 09, 2007 11:22 pm View user's profile Send private message
marten



Joined: 10 Sep 2007
Posts: 23

Post Reply with quote
FI-DD pleas I need your help in auto-short-story $max = 100; but the problem it cut the last word I tried to change many times $max but still it cut the last word in short story.
Example for short story
this is a good and great pulgins thanks for your eff...
here is the probem the word effort is eff...
please advise
Thanks in advance
Wed Sep 12, 2007 7:14 pm View user's profile Send private message
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2801
Location: Germany

Post Reply with quote
Yes, it's because the plugin cuts the text after 100 characters. The script doesn't know if the last word is complete or not - it just counts to 100 and then cuts it off.
Wed Sep 12, 2007 7:55 pm View user's profile Send private message
marten



Joined: 10 Sep 2007
Posts: 23

Post Reply with quote
Thanks FI-DD
Wed Sep 12, 2007 8:04 pm View user's profile Send private message
marten



Joined: 10 Sep 2007
Posts: 23

Post Reply with quote
Please FI-DD I need some help some times I need when I add a new news to add a picture and a text around the text in short story so when I did that I found that the autoshort overwrite what I did in the short story and cut after 100 characters so how I can solve this problem please?
Thanks in advance
Wed Sep 19, 2007 8:34 pm View user's profile Send private message
scottdallas



Joined: 04 May 2006
Posts: 1943
Location: US

Post Reply with quote
I finally found out why I had so much trouble with this all this time. I did some testing. First, after changing cute.js as FI-DD instructed above, you need to clear your browser cache or it will continue to tell you that you need to fill in a value in your {short-story}... second.. this will only work on NEW content items you add to your site. Existing content will have to be readded or truncated manually. I edited a news item, erased {short-story} value, checked, it was still blank.. I then added a new content item from scratch and it truncated properly.

Just thought someone might find a little heads-up useful Smile

_________________
www.scottdizzle.com uses cnr Smile
last update: 07-22-08: 8:30 pm
Wed Sep 26, 2007 1:45 am View user's profile Send private message Visit poster's website AIM Address
scottdallas



Joined: 04 May 2006
Posts: 1943
Location: US

Post Reply with quote
Hey FI-DD.. is it possible to make this work with the 'Guest can add news' hack? I noticed when the {full-story} is entered.. it does not put the info into the {short-story}, it leaves it blank.

_________________
www.scottdizzle.com uses cnr Smile
last update: 07-22-08: 8:30 pm
Thu Sep 27, 2007 7:06 am View user's profile Send private message Visit poster's website AIM Address
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2801
Location: Germany

Post Reply with quote
Just add something like this to the code:
Code:
if($short_story == ''){$short_story = substr($full_story, 0, 100).'...';}

Fri Sep 28, 2007 3:00 pm View user's profile Send private message
scottdallas



Joined: 04 May 2006
Posts: 1943
Location: US

Post Reply with quote
Cool, thanks! You always make it seem so simple.

_________________
www.scottdizzle.com uses cnr Smile
last update: 07-22-08: 8:30 pm
Fri Sep 28, 2007 10:24 pm View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:    
Reply to topic    Forum Index » Additional Downloads All times are GMT + 1 Hour
Page 1 of 1

 
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.