Page 1 of 17

[MODDB] Prime Quick Style - Switch styles from any page

Posted: Sat Jan 12, 2008 10:11 am
by primehalo
MOD Title: Prime Quick Style
MOD Description: Adds a style dropdown box to the header of every page for quickly switching between styles. The dropdown box will only be displayed if the board is set to allow multiple styles.
MOD Version: View Installation Instructions for version number
MOD Download: Main Download

For the release history, please view the Installation Instructions.

Re: [RC1] Prime Quick Style - Switch styles from any page

Posted: Sat Jan 12, 2008 12:54 pm
by Jimbo22
Great mod, but there seems to be a huge conflict with the line ...

Code: Select all

add_form_key('prime_quick_style');


Everytime you try to post or submit a form you'll get the message
"The submitted form was invalid. Try submitting again."



If you'll remove the line everything works fine, well, except the Prime Quick Style mod itself.

Re: [RC1] Prime Quick Style - Switch styles from any page

Posted: Sat Jan 12, 2008 1:35 pm
by IronDogg
I have installed it and it works really good... I am using Firefox 2.0.0.11, and IE ver 7.0.5730.11 and have no problems at all. Good job, and thanks for taking a mod request from this forum. That is nice of you.

I was wondering if the "Change" button is necessary though. The template changing seems to work for me as soon as I release the mouse button on the menu. I take it that is not the intention though, otherwise you wouldn't have included the "Change" button in the first place. Is the change button needed for certain browsers, or can it be safely taken out?

Re: [RC1] Prime Quick Style - Switch styles from any page

Posted: Sat Jan 12, 2008 6:36 pm
by gph
FANTASTIC Mod, primehalo! Works perfectly! THANK YOU!!

Re: [RC1] Prime Quick Style - Switch styles from any page

Posted: Sat Jan 12, 2008 7:06 pm
by primehalo
Jimbo22 wrote:Great mod, but there seems to be a huge conflict with the line ...

Code: Select all

add_form_key('prime_quick_style');


Everytime you try to post or submit a form you'll get the message
"The submitted form was invalid. Try submitting again."



If you'll remove the line everything works fine, well, except the Prime Quick Style mod itself.
I noticed that issue right after I uploaded, and thought I removed it and re-uploaded before anyone had a chance to actually download it. You also have to remove the token check in ucp.php, and the token variable in the template changes.
IronDogg wrote:I have installed it and it works really good... I am using Firefox 2.0.0.11, and IE ver 7.0.5730.11 and have no problems at all. Good job, and thanks for taking a mod request from this forum. That is nice of you.

I was wondering if the "Change" button is necessary though. The template changing seems to work for me as soon as I release the mouse button on the menu. I take it that is not the intention though, otherwise you wouldn't have included the "Change" button in the first place. Is the change button needed for certain browsers, or can it be safely taken out?
The change button is for those people that don't have JavaScript enabled, but it could be placed inside <noscript></noscript> tags.

Code: Select all

<!-- IF S_QUICK_STYLE_OPTIONS --><li class="rightside"><form action="{S_QUICK_STYLE_ACTION}" method="post"><label for="prime_quick_style"><span style="font-size:0.9em;vertical-align:middle">{L_PRIME_QUICK_STYLE}: </span><select name="prime_quick_style" id="prime_quick_style" style="font-size:0.9em;" onchange="this.form.submit();">{S_QUICK_STYLE_OPTIONS}</select></label><noscript><label><input type="submit" value="{L_CHANGE}" class="button2" style="font-size:0.9em;" /></label></noscript></form></li><!-- ENDIF -->

Re: [RC1] Prime Quick Style - Switch styles from any page

Posted: Sat Jan 12, 2008 9:01 pm
by DJ Skitzo
Thanks for the mod Primehalo, yet another really usefull mod :D

Re: [RC1] Prime Quick Style - Switch styles from any page

Posted: Sun Jan 13, 2008 4:06 pm
by gph
The <noscript> tags work perfectly :-) Note to users: don't forget to add the extra <label> </label> tags if you add the <noscript> tags.

Re: [RC1] Prime Quick Style - Switch styles from any page

Posted: Tue Jan 15, 2008 11:23 pm
by EasyPeepAndSoda
Great work man thanks.
primehalo wrote:The dropdown box will only be displayed for a user that is logged in, and only if the board is set to allow multiple styles.
Can it be displayed for users that are logged out as well or this has some security risk?
Also would've been nice to have it on bottom of page.

Can you write same one for changing language?

Re: [RC1] Prime Quick Style - Switch styles from any page

Posted: Thu Jan 17, 2008 12:13 pm
by PureLoneWolf
Hi there

Great mod, but is it possible to add it to the subsilver2 theme? I can't see where in the overall_header.html file I can get edit?

Any help greatfully recieved

Re: [RC1] Prime Quick Style - Switch styles from any page

Posted: Thu Jan 17, 2008 7:08 pm
by primehalo
EasyPeepAndSoda wrote:Great work man thanks.
primehalo wrote:The dropdown box will only be displayed for a user that is logged in, and only if the board is set to allow multiple styles.
Can it be displayed for users that are logged out as well or this has some security risk?
Also would've been nice to have it on bottom of page.

Can you write same one for changing language?
I don't think it's a security risk, I just don't know if it will change for all guests when one guest changes it. And if it does, I'm sure a workaround can be found, but at the moment I don't have time to work on that. Paid projects always take precedence.
PureLoneWolf wrote:Hi there

Great mod, but is it possible to add it to the subsilver2 theme? I can't see where in the overall_header.html file I can get edit?

Any help greatfully recieved
Subsilver2 instructions are located in the templates folder.

Re: [RC1] Prime Quick Style - Switch styles from any page

Posted: Thu Jan 17, 2008 7:16 pm
by PureLoneWolf
I didn't see that... :oops:

many thanks :)

Re: [RC1] Prime Quick Style - Switch styles from any page

Posted: Sat Mar 08, 2008 5:19 am
by Anyasha
onchange="" will break XHTML validation.

Re: [RC1] Prime Quick Style - Switch styles from any page

Posted: Sat Mar 08, 2008 7:07 am
by primehalo
Anyasha wrote:onchange="" will break XHTML validation.
Since when?

Re: [RC1] Prime Quick Style - Switch styles from any page

Posted: Tue Mar 11, 2008 2:28 am
by roleph
primehalo wrote:The change button is for those people that don't have JavaScript enabled, but it could be placed inside <noscript></noscript> tags.

Code: Select all

<!-- IF S_QUICK_STYLE_OPTIONS --><li class="rightside"><form action="{S_QUICK_STYLE_ACTION}" method="post"><label for="prime_quick_style"><span style="font-size:0.9em;vertical-align:middle">{L_PRIME_QUICK_STYLE}: </span><select name="prime_quick_style" id="prime_quick_style" style="font-size:0.9em;" onchange="this.form.submit();">{S_QUICK_STYLE_OPTIONS}</select></label><noscript><label><input type="submit" value="{L_CHANGE}" class="button2" style="font-size:0.9em;" /></label></noscript></form></li><!-- ENDIF -->
I will try that but do have a question before beginning: Where do I have to put that code?

Re: [RC1] Prime Quick Style - Switch styles from any page

Posted: Tue Mar 11, 2008 2:39 am
by primehalo
roleph wrote:
primehalo wrote:The change button is for those people that don't have JavaScript enabled, but it could be placed inside <noscript></noscript> tags.

Code: Select all

<!-- IF S_QUICK_STYLE_OPTIONS --><li class="rightside"><form action="{S_QUICK_STYLE_ACTION}" method="post"><label for="prime_quick_style"><span style="font-size:0.9em;vertical-align:middle">{L_PRIME_QUICK_STYLE}: </span><select name="prime_quick_style" id="prime_quick_style" style="font-size:0.9em;" onchange="this.form.submit();">{S_QUICK_STYLE_OPTIONS}</select></label><noscript><label><input type="submit" value="{L_CHANGE}" class="button2" style="font-size:0.9em;" /></label></noscript></form></li><!-- ENDIF -->
I will try that but do have a question before beginning: Where do I have to put that code?
You don't need to do that for the latest version. Just follow the installation instructions.