Here is my "Serendipity Sidebar Item Collapser" pl

Creating and modifying plugins.
AzRAeL
Regular
Posts: 22
Joined: Sun May 28, 2006 7:45 pm

Here is my "Serendipity Sidebar Item Collapser" pl

Post by AzRAeL »

I know there are already solutions that do this, but here's my version:

http://www.warpzone.at/projects/serendi ... llapse.zip

It enables the viewer to expand/collapse sidebaritems via Javascript - and stores the selection in a cookie - also check out the plugin-options.

Btw this uses prototype and scriptaculous and tries only to load these 2 if they are not included already :)

Feedback/suggestions would be highly appreciated!

hf

AzRAeL
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Here is my "Serendipity Sidebar Item Collapser"

Post by garvinhicking »

Hi!

What would you think about people being able to move around the sidebar items?

Like this one:

http://www.brothercake.com/site/resources/scripts/dbx/

?

Would you like to add your functionality into the s9y sidebarhider plugin as a second option? Like "Choose which JS to use: [x] custom [ ] scriptaculous"? Because the sidebarhider plugin of s9y can do a lot of other cool things as well, but I see a use in your revamped JS usage! :)

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
AzRAeL
Regular
Posts: 22
Joined: Sun May 28, 2006 7:45 pm

hmm - moving the items...

Post by AzRAeL »

great idea! thank god scriptaculous already has drag&drop implemented ;-)
I'll add this soon.

About adding it into the s9y sidebarhider plugin as a second option - i'll try ;-)
AzRAeL
Regular
Posts: 22
Joined: Sun May 28, 2006 7:45 pm

nearly finished

Post by AzRAeL »

Ok i am nearly finished now - drag&drop is implemented and works like a charm ;-) The updated version can be found here:

http://www.warpzone.at/projects/serendi ... llapse.zip

a question: wouldn't it be nicer to set CSS-classes instead of CSS and HTML code in the plugin options? The downside is that the user would have to edit his theme's stylesheets..

hmm - what is your suggestion?

btw - how do i know what to fill in here?

$propbag->add('requirements', array(
'serendipity' => '0.8',
'smarty' => '2.6.7',
'php' => '4.1.0'
));

thanks in advance

Azzy
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: nearly finished

Post by garvinhicking »

Hi!

Very cool, now just the integration into the sidebarhider plugin and we can add your code to Spartacus. That would be awesome :)
a question: wouldn't it be nicer to set CSS-classes instead of CSS and HTML code in the plugin options? The downside is that the user would have to edit his theme's stylesheets..
Can you give an example for what you mean with this?
btw - how do i know what to fill in here?

$propbag->add('requirements', array(
'serendipity' => '0.8',
'smarty' => '2.6.7',
'php' => '4.1.0'
));
You should be able to leave it with exactly those values!

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
AzRAeL
Regular
Posts: 22
Joined: Sun May 28, 2006 7:45 pm

cssclasses

Post by AzRAeL »

hi, i saw in the s9y sidebarhider plugin options, that the user can specify csscode for CSS-Style des Verstecken-Links (text-decoration:none;float:right;margin-right:3px;), HTML für den Anzeigen-Link, HTML für den Verstecken-Link.

I meant that it maybe would be nicer just to specify a CSS-Class name here and let the user put the code itself into the themes stylesheet...

IDEA: i keep cssclassnames here, deliver a additional stylesheet for those classes (a default one) and give the option to deaktivate this stylesheet and use the users theme styles...

I already put that in for "CSS-Klasse für verborgene Blöcke" which is blank by default. if you specify a classname here it will be applyed to the item (same happens for "CSS-Klasse für expandierte Blöcke")

btw maybe i should give the possibility to de/activate drag&drop and collapsing independantly...
Last edited by AzRAeL on Wed Aug 09, 2006 1:02 pm, edited 1 time in total.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: cssclasses

Post by garvinhicking »

Hi!

Ah, okay, now I see. It would be nice to have an option to alternatively assign a "class" instead of a "style". The plugin could be modified to check if the user input contains " " , ":" or ";". If so, the input is emitted within a 'style' tag. If not, his input is emitted as a "Class". Ain't that clever? :)
btw maybe i should give the possibility to de/activate drag&drop and collapsing independantly...
That would be very helpful!

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
AzRAeL
Regular
Posts: 22
Joined: Sun May 28, 2006 7:45 pm

great!

Post by AzRAeL »

damn i never thought of that! great idea!
clafferty
Regular
Posts: 43
Joined: Tue Jul 18, 2006 8:47 pm

Re: great!

Post by clafferty »

this plugin is great. :)

it works like a charm in Firefox... but doesn't seem to work for me in IE. should it be?

thanks... :)
AzRAeL
Regular
Posts: 22
Joined: Sun May 28, 2006 7:45 pm

the next version

Post by AzRAeL »

works also in IE - i found the problem now ;-) - i will post it here tomorrow
clafferty
Regular
Posts: 43
Joined: Tue Jul 18, 2006 8:47 pm

Re: the next version

Post by clafferty »

AzRAeL wrote:works also in IE - i found the problem now ;-) - i will post it here tomorrow
woot.

:D
AzRAeL
Regular
Posts: 22
Joined: Sun May 28, 2006 7:45 pm

new version available

Post by AzRAeL »

Hi, so there is a new version available under the same link as above... IE should be fixed now. The only IE resrtiction is that you cannot use "! important" when specifying CSS-code in the options - but i think we can live with that ;-)

please test and give suggestions/bugreports.

cheers

Azzy
clafferty
Regular
Posts: 43
Joined: Tue Jul 18, 2006 8:47 pm

Re: new version available

Post by clafferty »

the drag/drop seems to work in IE, but the collapsing does not... at least for me. i don't want anyone who uses IE to be reading my site anyway... but thought i'd let you know. :)


AzRAeL wrote:Hi, so there is a new version available under the same link as above... IE should be fixed now. The only IE resrtiction is that you cannot use "! important" when specifying CSS-code in the options - but i think we can live with that ;-)

please test and give suggestions/bugreports.

cheers

Azzy
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: new version available

Post by garvinhicking »

Hi Azrael!

Just a quick question, do you want to take a look into the sidebarhider integration? Because if you're not doing it, I would love to make a general call for developers to integrate your cool functionality into the existing plugin. :-)

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
AzRAeL
Regular
Posts: 22
Joined: Sun May 28, 2006 7:45 pm

hmm

Post by AzRAeL »

Because if you're not doing it, I would love to make a general call for developers to integrate your cool functionality into the existing plugin. Smile
yeah - make the call please , i'm so tired and my holiday is over ;-)
Post Reply