Trim Plugin (not working for now)

Development-related discussion, including bundled plugins
oYoX
Bear Rating Trainee
Bear Rating Trainee
Posts: 2
Joined: 12 Apr 2013, 14:30

Trim Plugin (not working for now)

Postby oYoX » 12 Apr 2013, 14:41

Hello everyone,

as mentioned in this thread (viewtopic.php?f=8&t=1802 ) I tried to write a plugin, which trims the text (only text, pictures are showed normally) and shows a text (e.q. "more") to expand the box.

Its currently untested, so I would like to read some comments ;)

Unzip the plugin to the plugin dir - inside you find also a file called init.js - this is the settings-file and look like this:

Code: Select all

$.expander.defaults.slicePoint = 120;

$(document).ready(function() {
  // override default options (also overrides global overrides)
  $('div.cdmContent p').expander({
    slicePoint:       80,  // default is 100
    expandPrefix:     ' ', // default is '... '
    expandText:       '[...]', // default is 'read more'
    collapseTimer:    5000, // re-collapses after 5 seconds; default is 0 (off)
    userCollapseText: '[^]'  // default is 'read less'
  });

});


Configuration:
slice Point = charakter count before break
expand Prefix = text before the break (without link)
expand Text = text inside the expand link
collapse Timer = automatic re collapse timer
user Collapse Text = text inside collapse link

Have fun :D

Greetings
oYoX
Attachments
article_trim.zip
(37.41 KiB) Downloaded 135 times
Last edited by oYoX on 19 Apr 2013, 13:33, edited 1 time in total.

justauser
Bear Rating Master
Bear Rating Master
Posts: 133
Joined: 23 Mar 2013, 20:37

Re: Trim Plugin

Postby justauser » 12 Apr 2013, 19:01

I gave it a try and it didn't work. Errored loading the init.php page and I had to remove. I don't think this is hooked into tt-rss correctly and I inspected the content preview with Firefox debugger and the class on the content isn't cdmContent but is contentPreview. AM I missing something?


Return to “Development”

Who is online

Users browsing this forum: No registered users and 1 guest