Auto short story

Download plugins, language packs and stuff.

Auto short story

Postby FI-DD » Sun Feb 19, 2006 11:20 pm

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: Select all
      elem.name == "short_story"

   || elem.name == "poster"




with this:

Code: Select all
      elem.name == "poster"
Attachments
auto-short-story.zip
Auto short story
(453 Bytes) Downloaded 773 times
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Postby flyboy17 » Mon Apr 09, 2007 11:22 pm

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'.
flyboy17
 
Posts: 63
Joined: Wed Feb 21, 2007 4:32 pm

Postby marten » Wed Sep 12, 2007 7:14 pm

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
marten
 
Posts: 23
Joined: Mon Sep 10, 2007 12:04 pm

Postby FI-DD » Wed Sep 12, 2007 7:55 pm

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.
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Postby marten » Wed Sep 12, 2007 8:04 pm

Thanks FI-DD
marten
 
Posts: 23
Joined: Mon Sep 10, 2007 12:04 pm

Postby marten » Wed Sep 19, 2007 8:34 pm

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
marten
 
Posts: 23
Joined: Mon Sep 10, 2007 12:04 pm

Postby scottdallas » Wed Sep 26, 2007 1:45 am

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 :)
Everyday I'm tumblin http://scodal.tumblr.com
User avatar
scottdallas
 
Posts: 2209
Joined: Thu May 04, 2006 6:46 pm
Location: US

Postby scottdallas » Thu Sep 27, 2007 7:06 am

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.
Everyday I'm tumblin http://scodal.tumblr.com
User avatar
scottdallas
 
Posts: 2209
Joined: Thu May 04, 2006 6:46 pm
Location: US

Postby FI-DD » Fri Sep 28, 2007 3:00 pm

Just add something like this to the code:
Code: Select all
if($short_story == ''){$short_story = substr($full_story, 0, 100).'...';}
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Postby scottdallas » Fri Sep 28, 2007 10:24 pm

Cool, thanks! You always make it seem so simple.
Everyday I'm tumblin http://scodal.tumblr.com
User avatar
scottdallas
 
Posts: 2209
Joined: Thu May 04, 2006 6:46 pm
Location: US

Postby DistantJ » Sat Jul 25, 2009 4:49 pm

Those of you having trouble with "Short story must contain a value", look here:

http://forums.cutenewsru.com/wysiwyg--u ... t2924.html
DistantJ
 
Posts: 33
Joined: Tue Jul 29, 2008 10:27 am

Postby DistantJ » Wed Jul 29, 2009 1:04 am

Scott, here's one I've edited so you can apply it to your old news without re-adding it. Now if you edit a post and empty the Short Story field, when you click "Edit" it'll overwrite it's short story with a truncated full story.

Also, my version will only make an auto short story if the short story field is empty. This means you can go back and fix up any truncated HTML tags and such, or replace the short story manually.

Obviously, change the number of letters in there, I have it at 2000.
Attachments
auto-short-story.zip
(474 Bytes) Downloaded 144 times
DistantJ
 
Posts: 33
Joined: Tue Jul 29, 2008 10:27 am


Return to Additional Downloads



Who is online

Users browsing this forum: No registered users and 0 guests

cron