The Serendipity Handbook

You can now read the (german) handbook here: PDF - https://github.com/s9y/Book (LaTeX source).

Forum-Information

Before posting about errors, make sure that the answer cannot already be found in our FAQ or by searching this forum!
Posting is restricted to registered users (registering is free and simple!) due to recent spam attacks. When having trouble with this board, contact garvin(-at)s9y(-dot)org.

Board index Plugins Template chooser

Creating and modifying plugins.
User avatar
Eni
Regular
 
Posts: 62
Joined: Thu Jan 27, 2005 11:47 pm
Location: Münster, Germany

Postby Eni » Wed Nov 23, 2011 3:30 am

Hi~

a small snippet format question again, sorry.

I installed "serendipity_event_templatechooser" and added this to my index.tpl:
Code: Select all
<a href="index.php?serendipity[template]=mimbo-eni">Green</a>
<a href="index.php?serendipity[template]=mimbo-eni-red">Red</a>
<a href="index.php?serendipity[template]=mimbo-eni-purple">Purple</a>


Apparently this is either not how it works or I use the wrong template names. As I understood from an older post, I just need to install the template chooser and add the link in the format "index.php?serendipity[template]=mimbo" but I must overlook something since it doesn't work :|

What I basically want to do is let the visitor choose the link (highlight) color of mimbo which is actually changing just five font color parameter in the style.css file. I tried adding a simple php css switch first but couldn't get it to work. I suppose because Smarty needs a different syntax and I didn't do it right. So I wanted to try it with the template chooser now, which is a bit overkill for just one color in the css file, but oh well. I don't want the dropdown but just a small line of colored mini-squares on top of my header to click on for the color switch. I tried looking at the dropdown source code of the blog but I have no idea how to rewrite that from a dropdown list to plain links :?

~eni
Sorry, I'm Late. But I Got Lost On The Road Of Life.

User avatar
garvinhicking
Core Developer
 
Posts: 29471
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany

Postby garvinhicking » Wed Nov 23, 2011 12:45 pm

Hi!

You need to use serendipity[user_template]=XXX :)

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/

User avatar
Eni
Regular
 
Posts: 62
Joined: Thu Jan 27, 2005 11:47 pm
Location: Münster, Germany

Postby Eni » Wed Nov 23, 2011 1:44 pm

Moin,

hmmmm, that didn't work.

However, this did:
<a href="index.php?user_template=mimbo-eni">Green</a>
<a href="index.php?user_template=mimbo-eni-red">Red</a>
<a href="index.php?user_template=mimbo-eni-purple">Purple</a>


Without the "serendipity[]". I take it as solved now, unless you think that this shouldn't be the correct way :D

Thank you~! ;*

//edit
You know, if I'm allowed to make a suggestion:
I think it would a good addition if there was a community wiki where each plugin and usage topic has a page and everyone can contribute code snippets, examples and tricky solutions to questions asked in the forum. The documentation for this template chooser, as example, is really only covering the "what it does" but without the background knowledge, it's already hard to just make such a simple thing like a linklist instead of a dropdown. I feel like a bother for asking so simple stuff, which is because I can only edit but not understand what I do, in most cases :|

The official s9y documentation covers the basic but concrete examples by users for users, like as in this case a more simple and pretty template switch, would be really nice, I think.

~eni
Sorry, I'm Late. But I Got Lost On The Road Of Life.

User avatar
garvinhicking
Core Developer
 
Posts: 29471
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany

Postby garvinhicking » Wed Nov 23, 2011 3:03 pm

Hi!

We have a wiki, and we also hand out access to anyone who would like to contribute! I can send you an account if you like!


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/

User avatar
Eni
Regular
 
Posts: 62
Joined: Thu Jan 27, 2005 11:47 pm
Location: Münster, Germany

Postby Eni » Tue Nov 29, 2011 3:24 pm

Hi,

I'm sorry for late replies. I'm a bit in the middle of finishing my studies this semester. The current blog project is supposed to become my portfolio for work and applications :)

Hmm, I don't think I can contribute much since I can't code myself (due to a math and logic disorder), just adapting a bit. So I'd probably more leech than be a help, if this is fine with you, I'd love to have access ^^;

~eni
Sorry, I'm Late. But I Got Lost On The Road Of Life.

User avatar
garvinhicking
Core Developer
 
Posts: 29471
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany

Postby garvinhicking » Tue Nov 29, 2011 3:58 pm

Hi!

The wiki is already publically readable, so no need for any access then. You'd only need an account if you want to actually write/contribute anything into the wiki. :)

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/

User avatar
Eni
Regular
 
Posts: 62
Joined: Thu Jan 27, 2005 11:47 pm
Location: Münster, Germany

Postby Eni » Fri Dec 16, 2011 10:32 pm

Hi,

sorry, busy as always ^^;
(And sick - gawd, I felt so bad...)

Aaah, so you mean the Docs on the frontpage. I was thinking of having really one page per plugin and/or task, and collecting solutions from the forum there.

As example, I use colored dots now to switch the template color with help of the template chooser event plugin. I would like to note that down in a easy to understand way for people looking for such a solution. So if there were a open s9y wiki, I could now put it on the page "template chooser plugin" as well as on... dunno... "user choice for templates" or so.

Would you like to extend the Docs with such categories? I wouldn't mind helping, if there's interest for it, else I just note it down on my website, I guess.

~eni
Sorry, I'm Late. But I Got Lost On The Road Of Life.

User avatar
garvinhicking
Core Developer
 
Posts: 29471
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany

Postby garvinhicking » Fri Dec 16, 2011 11:42 pm

Hi!

Aaah, so you mean the Docs on the frontpage. I was thinking of having really one page per plugin and/or task, and collecting solutions from the forum there.


The wiki is what people make out of it - this would surely be possible! :) Sure, I'd appreciate such content a lot.

If the book-open-sourcification goes along well we'd also have a starting base for that, so maybe it could be worth working from there. On the other hand, anything that gets contributed now can be implemented into that work later as well...

I'll PM you with a wiki account :)
# 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/

User avatar
Eni
Regular
 
Posts: 62
Joined: Thu Jan 27, 2005 11:47 pm
Location: Münster, Germany

Postby Eni » Sat Dec 17, 2011 5:07 am

Thank you! I should have some time this weekend to take a look, unless I fall out of the window while decorating it :mrgreen:

~eni
Sorry, I'm Late. But I Got Lost On The Road Of Life.



Return to Plugins

Who is online

Users browsing this forum: No registered users and 1 guest

cron