Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages

www.blogsome.com Forum Index » Bugs - Problems with your blog?

Post new topic   Reply to topic
dropdown category fix
View previous topic :: View next topic  
Author Message
jamesf
Guest





PostPosted: Fri Aug 26, 2005 11:39 am    Post subject: dropdown category fix Reply with quote

Hi,

To get around the category dropdown bug you
need to replace this code:

<form action="" method="POST">
<p style="padding: 0px; margin: 0px;">
{dropdown_cats optionall='0' all='All' sort_column='name'}
<input type="submit" name="submit" value="GO" /></p>
</form>

with this code:

<form name="category" action="" method="POST">
<p style="margin: 0px; padding: 0px;">
{blogsome_dropdown_cats optionall='0' all='All' sort_column='name'}
<input type="button" value="Go" onclick="window.location = (document.category.cat.options[document.category.cat.selectedIndex].value);" /></p>
</form>

You can see it in action on:
http://blogsometeam.blogsome.com

If you need me to clear out your smartycache to get it to work or have suggestions please post a reply

Jamesf

[Moderator Edit: removed superfluous line break to fix code]
Back to top
schinckel



Joined: 03 Apr 2005
Posts: 1238
Location: Adelaide, Australia

PostPosted: Sat Aug 27, 2005 12:25 pm    Post subject: Reply with quote

This is very cool, jamesf, thanks for that.

(I had to remove a line break from in your code, I've taken the liberty of editing the post).

I noticed that you have the same type of thing going on for archives. The closest I can get is:

Code:
<form name="archiveform" action="" method="POST">
<p style="margin: 0px; padding: 0px;">
{blogsome_dropdown_arcs optionall='0' all='All' sort_column='name'}
<input type="button" value="Go" onclick="window.location = (document.forms.archiveform.archive_chrono[document.forms.archiveform.archive_chrono.selectedIndex].value);" /></p>
</form>


But I don't know the tag I need to use instead of {blogsome_dropdown_arcs}

I also noticed that this is a special {blogsome_} smarty tag - are there any more of these you can tell us about?
_________________
Blogsome Forum: Rules/Search
WordPress Codex; Smarty Tags Docs
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
schinckel



Joined: 03 Apr 2005
Posts: 1238
Location: Adelaide, Australia

PostPosted: Sat Aug 27, 2005 12:33 pm    Post subject: Reply with quote

Egg on face: I should do what I tell others to do, and check the codex...

Code:
<form name="archiveform" action="" method="POST">
<p style="margin: 0px; padding: 0px;"><select id="archive_chrono">
<option value=''>Select Month to View</option>
{get_archives type='monthly' format='option'}
<input type="button" value="Go" onclick="window.location = (document.forms.archiveform.archive_chrono[document.forms.archiveform.archive_chrono.selectedIndex].value);" /></p>
</form>


Will do the trick...
_________________
Blogsome Forum: Rules/Search
WordPress Codex; Smarty Tags Docs
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
johnt



Joined: 07 Feb 2005
Posts: 148
Location: Perth, Australia

PostPosted: Mon Aug 29, 2005 1:29 am    Post subject: Reply with quote

is it possible to do a drop-down menu for Links such as your Blogroll
Back to top
View user's profile Send private message Send e-mail Visit poster's website
schinckel



Joined: 03 Apr 2005
Posts: 1238
Location: Adelaide, Australia

PostPosted: Mon Aug 29, 2005 3:04 am    Post subject: Reply with quote

You'd think so. I got to this stage:

Code:
<form name="linksform" action="" method="POST">
<p style="margin: 0px; padding: 0px;"><select id="links_chooser">
<option value=''>Select Link to Visit</option>
{get_links before='<option value=" after='</option>'}
<input type="button" value="Go" onclick="window.location = (document.forms.linksform.links_chooser[document.forms.linksform.links_chooser.selectedIndex].value);" /></p>
</form>


But this won't quite work: you can choose a link, but it will not follow it. There doesn't seem to be a way to tell it to put the URL of the link into the value field of the option marker: each item is already an a href link, and cannot be split.

It might be possible to do it using smarty tags: {capture}, and splitting the text, but that will be ugly!

I'm guessing this is the same issue that arose for the categories one. Can we have {blogsome_dropdown_links} tag made, please? (There isn't one, AFAICS).
_________________
Blogsome Forum: Rules/Search
WordPress Codex; Smarty Tags Docs
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
inkblotter



Joined: 21 Jul 2005
Posts: 10

PostPosted: Tue Sep 06, 2005 3:23 pm    Post subject: Reply with quote

I used this code in my sidebar for the Archives dropdown, and it worked like a charm:


Code:
<form id="archiveform" action="">
<select name="archive_chrono" onchange="window.location =
(document.forms.archiveform.archive_chrono[document.forms.archiveform.archive_chrono.selectedIndex].value);" />
<option value=''>Select Month</option>
{get_archives type='monthly' format='option'}
</select>
</form>
Back to top
View user's profile Send private message Visit poster's website
outonthefringe



Joined: 09 Jan 2006
Posts: 9

PostPosted: Thu Sep 28, 2006 2:12 pm    Post subject: Category dropdown without 'Go' button Reply with quote

OK, I pieced together how to do this with my Archives and Links, but have no idea how to fix it with my Categories. (See my blog to see how I have them.) I want to have the Categories links work without having to click the 'Go' button.

I've pieced this together, but it doesn't work. I have to admit I have no idea what I'm doing. What do you guys think?

Code:

<form id="category" action="">
<select name="cat_list" onchange="window.location = (document.category.cat.options[document.category.cat.selectedIndex].value);" />
<option value=''>Select Category</option>
{capture name="catslist"}{blogsome_cats optionall='0' all='All' sort_column='name'}{/capture}
{$smarty.capture.catslist|replace:'<a':'<option'|replace:'</a>':'</option>'|replace:'href':'value'}
</form>

_________________
Stephen
http://regen2.blogsome.com
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    www.blogsome.com Forum Index » Bugs - Problems with your blog? All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum