Page 1 of 1

Trim Plugin (not working for now)

Posted: 12 Apr 2013, 14:41
by oYoX
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'


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


Re: Trim Plugin

Posted: 12 Apr 2013, 19:01
by justauser
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?