[BETA] Change Style 0.9.8 (updated)

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! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
User avatar
Ricky_Racer
Registered User
Posts: 609
Joined: Wed Feb 12, 2003 10:02 pm

Re: [BETA] Change Style 0.9.8 (updated)

Post by Ricky_Racer » Tue Oct 23, 2007 1:53 pm

In an earlier post in this topic, the javascript code for a simple drop down menu, you will have to change the names to match your templates, but it should still work. ;)

Code: Select all

	<!-- Start mod : change style v.0.9.8 -->
	<script language="javaScript">
	function ChangeStyle()
	{
		var number = document.DD.DDM.selectedIndex;
		location.href = document.DD.DDM.options[number].value;
	}
	</script>
	<tr>
		<td align="center"><span class="mainmenu">
			<form name="DD">
			<Select name="DDM" onChange="ChangeStyle(this.form)">
				<option selected> Choose Board Style 
				<option value="changestyle.php?s=cleanSilver">Clean Silver
				<option value="changestyle.php?s=smartDark">Smart Dark
				<option value="changestyle.php?s=subSilver">SubSilver
			</select>
			</form></span>
		</td>
	</tr>
	<!-- Finish mod : change style v.0.9.8 -->

Coroner
Registered User
Posts: 123
Joined: Sat Sep 16, 2006 3:48 am
Contact:

Re: [BETA] Change Style 0.9.8 (updated)

Post by Coroner » Tue Oct 23, 2007 8:39 pm

Thank you so much! I got it working but I do have a problem:

I have many heavily moded templates installed and I had multiple errors but managed to find and correct the problems except for one.
For template GIRRed, I get this error message:
#######################################################################
phpBB : Critical Error

Could not update user theme info

DEBUG MODE

SQL Error : 1054 Unknown column 'GIRRed' in 'where clause'
#######################################################################
I had this same issue with a few other templates and found that I had simply spelled the names wrong for the overall_header.tpl file edits but I have checked this one many times and against the db and it keeps giving the error?

Here's the edited code for that file:
######################################################################
<!-- start mod : change style v.0.9.8 -->
<script language="javaScript">
function ChangeStyle()
{
var number = document.DD.DDM.selectedIndex;
location.href = document.DD.DDM.options[number].value;
}
</script>
<tr>
<td align="center"><span class="mainmenu">
<form name="DD">
<Select name="DDM" onChange="ChangeStyle(this.form)">
<option selected> Choose Board Style
<option value="changestyle.php?s=acidgamerblack">AcidGamerBlack
<option value="changestyle.php?s=AcidTechBlood">AcidTechBlood
<option value="changestyle.php?s=AcidTechBloodEx">AcidTechBloodEx
<option value="changestyle.php?s=AcidTechGreen">AcidTechGreen
<option value="changestyle.php?s=AcidTechGreenEx">AcidTechGreenEx
<option value="changestyle.php?s=AcidTechPurple">AcidTechPurple
<option value="changestyle.php?s=AcidTechPurpleEx">AcidTechPurpleEx
<option value="changestyle.php?s=AcidTechTiger">AcidTechTiger
<option value="changestyle.php?s=AcidTechTigerEx">AcidTechTigerEx
<option value="changestyle.php?s=BBTech">BBTech
<option value="changestyle.php?s=fwsblack1">FwsBlack
<option value="changestyle.php?s=GIRRed">GIR Red
<option value="changestyle.php?s=blueGlass">BlueGlass
<option value="changestyle.php?s=redGlass">RedGlass
<option value="changestyle.php?s=yellowGlass">YellowGlass
<option value="changestyle.php?s=orangeGlass">OrangeGlass
<option value="changestyle.php?s=greenGlass">GreenGlass
<option value="changestyle.php?s=cyanGlass">CyanGlass
<option value="changestyle.php?s=subSilver">SubSilver
<option value="changestyle.php?s=Torre_Nera">Torre_Nera
<option value="changestyle.php?s=XredeX">XredeX
</select>
</form></span>
</td>
</tr>
<!-- finish mod : change style v.0.9.8 -->
#################################################################################

Here's a link to my forums:
http://cscoroner.com/phpBB2/index.php

As you will see I moved the overall_header.tpl edit from the overall_header.tpl file to the index.tpl and it works fine. I just can't make it work for the GIRRed template?

Your thoughts?

Please let me know....

User avatar
Ricky_Racer
Registered User
Posts: 609
Joined: Wed Feb 12, 2003 10:02 pm

Re: [BETA] Change Style 0.9.8 (updated)

Post by Ricky_Racer » Wed Oct 24, 2007 2:31 am

I had probably a similar problem with the Rainy Day template, it's folder name was Rainy, but I had to use the style name from the database, which was Rainy Day, could that be what is happening to yours ?

Coroner
Registered User
Posts: 123
Joined: Sat Sep 16, 2006 3:48 am
Contact:

Re: [BETA] Change Style 0.9.8 (updated)

Post by Coroner » Wed Oct 24, 2007 4:13 am

Thanks for the help!
The style name in the db is GIR Red and theme name GIRRed so I tried

<option value="changestyle.php?s=GIR Red">GIR Red
And get this:
##################################################
phpBB : Critical Error

Could not update user theme info

DEBUG MODE

SQL Error : 1054 Unknown column 'GIR' in 'where clause'
##################################################
So the space won't fly? I've tried many combinations with no luck so far.

Could there be a code needed in the space GIR#Red?

Please let me know.

Coroner
Registered User
Posts: 123
Joined: Sat Sep 16, 2006 3:48 am
Contact:

Re: [BETA] Change Style 0.9.8 (updated)

Post by Coroner » Wed Oct 24, 2007 4:57 am

OK I got it. I took the space out in the db and all is working.

I did notice that when your not logged in and change styles, if you try to view threads it changes back to the default style but if your logged in then you view with the newly selected style?

Is this normal?

Please let me know.

Tuplad
Registered User
Posts: 22
Joined: Sun Feb 10, 2008 11:36 am

Re: [BETA] Change Style 0.9.8 (updated)

Post by Tuplad » Sun Aug 03, 2008 2:30 pm

I didn't read all the pages, but does this mod still work :ugeek: ?

Post Reply

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