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

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Suggested Hosts
User avatar
primehalo
Former Team Member
Posts: 2697
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

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

Postby primehalo » Sat Jan 12, 2008 10:11 am

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.
Last edited by primehalo on Wed Sep 02, 2009 5:55 pm, edited 2 times in total.
Ken F. Innes IV
My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

Jimbo22
Registered User
Posts: 2
Joined: Thu Mar 29, 2007 2:36 pm
Location: Germany

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

Postby Jimbo22 » Sat Jan 12, 2008 12:54 pm

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.

IronDogg
Registered User
Posts: 130
Joined: Thu Sep 26, 2002 11:47 pm

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

Postby IronDogg » Sat Jan 12, 2008 1:35 pm

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?

gph
Registered User
Posts: 66
Joined: Tue Jul 10, 2007 9:16 pm

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

Postby gph » Sat Jan 12, 2008 6:36 pm

FANTASTIC Mod, primehalo! Works perfectly! THANK YOU!!

User avatar
primehalo
Former Team Member
Posts: 2697
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

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

Postby primehalo » Sat Jan 12, 2008 7:06 pm

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 -->
Ken F. Innes IV
My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

DJ Skitzo
Registered User
Posts: 596
Joined: Sun Aug 12, 2007 7:25 pm

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

Postby DJ Skitzo » Sat Jan 12, 2008 9:01 pm

Thanks for the mod Primehalo, yet another really usefull mod :D

gph
Registered User
Posts: 66
Joined: Tue Jul 10, 2007 9:16 pm

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

Postby gph » Sun Jan 13, 2008 4:06 pm

The <noscript> tags work perfectly :-) Note to users: don't forget to add the extra <label> </label> tags if you add the <noscript> tags.

User avatar
EasyPeepAndSoda
Registered User
Posts: 55
Joined: Wed Nov 14, 2007 11:17 pm

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

Postby EasyPeepAndSoda » Tue Jan 15, 2008 11:23 pm

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?

PureLoneWolf
Registered User
Posts: 7
Joined: Sun Jan 04, 2004 10:19 am
Location: Nottingham
Contact:

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

Postby PureLoneWolf » Thu Jan 17, 2008 12:13 pm

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

User avatar
primehalo
Former Team Member
Posts: 2697
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

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

Postby primehalo » Thu Jan 17, 2008 7:08 pm

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.
Ken F. Innes IV
My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

PureLoneWolf
Registered User
Posts: 7
Joined: Sun Jan 04, 2004 10:19 am
Location: Nottingham
Contact:

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

Postby PureLoneWolf » Thu Jan 17, 2008 7:16 pm

I didn't see that... :oops:

many thanks :)

User avatar
Anyasha
Registered User
Posts: 704
Joined: Mon Aug 07, 2006 4:02 am
Name: Anyasha

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

Postby Anyasha » Sat Mar 08, 2008 5:19 am

onchange="" will break XHTML validation.
Kiss me, I'm Polish!

User avatar
primehalo
Former Team Member
Posts: 2697
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

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

Postby primehalo » Sat Mar 08, 2008 7:07 am

Anyasha wrote:onchange="" will break XHTML validation.

Since when?
Ken F. Innes IV
My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

roleph
Registered User
Posts: 19
Joined: Thu Feb 28, 2008 3:55 pm

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

Postby roleph » Tue Mar 11, 2008 2:28 am

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?

User avatar
primehalo
Former Team Member
Posts: 2697
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

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

Postby primehalo » Tue Mar 11, 2008 2:39 am

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.
Ken F. Innes IV
My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!


Return to “[3.0.x] MODs in Development”

Who is online

Users browsing this forum: MSNbot Media and 18 guests