WebArtz - The Web Design Forum
Welcome to WebArtz, Guest!

WebArtz is a nice place for discussions related to web designing and coding. We help our members to code their own website templates with HTML and CSS. We give them advice on various issues.

To know more about WebArtz Forum, visit the About Us page.

At the moment, you are viewing the forum as a guest. As a guest you can't make post and participate in discussions. You need to register and become a member of the forum. Click the register link below and become a part of this forum.

Thank You

WebArtz - The Web Design Forum
Welcome to WebArtz, Guest!

WebArtz is a nice place for discussions related to web designing and coding. We help our members to code their own website templates with HTML and CSS. We give them advice on various issues.

To know more about WebArtz Forum, visit the About Us page.

At the moment, you are viewing the forum as a guest. As a guest you can't make post and participate in discussions. You need to register and become a member of the forum. Click the register link below and become a part of this forum.

Thank You


You are not connected. Please login or register

Go to page : Previous  1, 2, 3, 4, 5, 6, 7  Next

View previous topic View next topic Go down  Message [Page 5 of 7]

1Accespted Forumotion Theme Changer! Tue Feb 02, 2010 8:17 pm

ankillien

ankillien
Administrator
Administrator
First topic message reminder :

Forumotion Theme Changer
Style sheet changer for Forumotion forums.

Hello Everyone Very Happy

I know, all Forumotion users want to have a theme changer or having multiple themes for their Forumotion forums. Here is a simple tutorial that will guide you to install a theme changer.

First of all, you need to go to get the JavaScript code which is provided by DynamicDrive.com. The JavaScript file is found on this page.


  • Navigate to your Admin Panel > Modules > HTML Page Management > Create New Page > Add the JavaScript code in the page and save it.

  • Navigate to Admin CP > Display > Templates > General > overall_header_new
    Find out this part in the template...
    Code:
    </head>

    Right before that you need to link the HTML page that you just created. You need to use the following code for that...
    Code:
    <script src="HTML PAGE URL HERE" type="text/javascript"></script>

  • Now you need to attach stylesheets Wink You can use the following code to link the stylesheets/themes.
    Code:
    <link rel="alternate stylesheet" type="text/css" media="screen" title="default" href="DEFAULT STYLE SHEET URL HERE" />

    <link rel="alternate stylesheet" type="text/css" media="screen" title="theme1" href="STYLE SHEET 1 URL HERE" />

    <link rel="alternate stylesheet" type="text/css" media="screen" title="theme2" href="STYLE SHEET 2URL HERE" />

    You can add as many stylesheets/themes as yo want. Just update the title attribute with increasing number. Like if you are going to add one more stylesheet, the code will look like this...
    Code:
    <link rel="alternate stylesheet" type="text/css" media="screen" title="theme3" href="STYLE SHEET 3 URL HERE" />
    Notice the value title attribute was changed to theme3.

    Remember that the <link...> tag for attaching stylesheet must go before the <script...> tag which you used to link the JavaScript code.

    Note : You can add as many style sheets as you want but don't forget to put link to your default style sheet too so that your members can change back to normal style as well. Title for default styleheet should be set to 'default'.

  • Now you need to create radio buttons with with the members can choose style they like. Here is the HTML code for that which should be placed anywhere inside the body tag. You can put it in footer or on top of the page. We will put it on top of the page. Add the following code right after the <body> tag starts in the template code.
    Code:
    <form id="switchform">

    <!-- Choose theme 1 -->
    <input type="radio" name="choice" value="default" onClick="chooseStyle(this.value, 60)">Default Theme<br />

    <!-- Choose theme 2 -->
    <input type="radio" name="choice" value="theme1" onClick="chooseStyle(this.value, 60)">Theme 1 Name<br />

    <!-- Choose theme 3 -->
    <input type="radio" name="choice" value="theme2" onClick="chooseStyle(this.value, 60)">Theme 2 Name
    </form>

    Notice the value attribute in the codes. It should be corresponding to the title of the respective theme.

  • Its almost done now. Save the template, publish the template and see if it works.


Hope the tutorial is simple enough to make sense to you Smile


Thank You Very Happy

The credit for the JavaScript and HTML codes goes to DynamicDrive.com. To learn more on how this code works and how to customize it, please visit here.



How to know the URL of desired style sheet?
Spoiler:

Notice : This tutorial is copyrighted by WebArtz Forum. You may not publish it on anywhere without written permission from the administrators.



Last edited by ankillien on Sun Feb 21, 2010 8:38 pm; edited 2 times in total


101Accespted Re: Forumotion Theme Changer! Sat Jul 24, 2010 10:19 am

Faz


Registered Member
Registered Member
Sorry, i hate to double post, but is there anything i can do do make my theme changer load other themes without the old background loading in the background, then going to the theme's current background?

102Accespted Re: Forumotion Theme Changer! Sat Jul 24, 2010 10:22 am

ankillien

ankillien
Administrator
Administrator
Faz wrote:Sorry, i hate to double post, but is there anything i can do do make my theme changer load other themes without the old background loading in the background, then going to the theme's current background?

For that, you need to edit the themes CSS and remove the background code from it. The theme changer can't be configured to do it.

103Accespted Re: Forumotion Theme Changer! Sat Jul 24, 2010 10:31 am

Faz


Registered Member
Registered Member
If i do that, will it remove the background completely from the default theme?
if not, where can i remove the code

104Accespted Re: Forumotion Theme Changer! Sat Jul 24, 2010 10:33 am

ankillien

ankillien
Administrator
Administrator
You can add your default background in the themes CSS by accessing this code...

body {
background-color : #;
background-image : url();
}

105Accespted Re: Forumotion Theme Changer! Sat Jul 24, 2010 10:35 am

Faz


Registered Member
Registered Member
Maybe i didn't explain it right
So the problem is, everything works fine. All the themes in the theme changer work fine and so do the background. so when i choose a theme other than the default theme, the default themes background loads quickly, then the theme i choose background is back. I want all the theme's background to shop up without the original background loading first

106Accespted Re: Forumotion Theme Changer! Sat Jul 24, 2010 10:40 am

ankillien

ankillien
Administrator
Administrator
I am getting what you want to say.
Can you provide a link to your forum so that I can check it myself?

107Accespted Re: Forumotion Theme Changer! Sat Jul 24, 2010 10:44 am

Faz


Registered Member
Registered Member
Yeah, the problem is when i click any other links in the forums, the default background always loads up quicky first, then the switched theme's background is loaded

link

108Accespted Re: Forumotion Theme Changer! Sat Jul 24, 2010 12:49 pm

ankillien

ankillien
Administrator
Administrator
It looks fine to me.
The new themes will take a while to load for the first time but once they are loaded completely, the background won't take longer time to load when switching the themes.

109Accespted Re: Forumotion Theme Changer! Sat Jul 24, 2010 1:42 pm

Faz


Registered Member
Registered Member
1 more question. Is there any to edit out a hitskin's forum width in the template codes?

110Accespted Re: Forumotion Theme Changer! Sat Jul 24, 2010 2:41 pm

ankillien

ankillien
Administrator
Administrator
You mean, hitskins demo forum's width to be changed in template?
There is no way to do it.

111Accespted Re: Forumotion Theme Changer! Sat Jul 24, 2010 2:54 pm

Faz


Registered Member
Registered Member
hmm.. didn't think so, so is there any other way of editing a hitskin demo? i tried to resize one of hitskins skins and reupload it on my account, but you cant

any other way to upload the theme?

112Accespted Re: Forumotion Theme Changer! Sat Jul 24, 2010 4:22 pm

ankillien

ankillien
Administrator
Administrator
You can't make changes in hitskin demo Razz
You can make changes in the CSS of the theme.

You can download the CSS of a particular theme, open it in a text editor, make changes and upload it to your web host and use it Wink

If you don't like hitksin themes, you can edit the CSS files of the themes and upload them to your web host. Thats the only solution.

113Accespted help please Fri Aug 27, 2010 10:02 am

acman


Registered Member
Registered Member
Hi,

I've tried to apply this theme changer on my forum, but to be safe, i'm creating a temporary/dummy forum to test it first

http://jerseytest.forumotion.asia

but i can't make it work Sad, it will only show the radio button

so this is what i've done so far

1. download the styleswitch.js
2. copy & paste the content as http://jerseytest.forumotion.asia/styleswitch-h2.htm (since i don't know how to upload the js file)
3. create the script code as http://jerseytest.forumotion.asia/Theme-Changer-h1.htm
with this content

<!--This script should appear below your LINK stylesheet tags -->

<script src="styleswitch-h2.htm" type="text/javascript">

/***********************************************
* Style Sheet Switcher v1.1- ©️ Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
***********************************************/

</script>

4. Update the overall_new header

with these additions
...

<script src="http://jerseytest.forumotion.asia/Theme-Changer-h1.htm" type="text/javascript"></script>

<link rel="alternate stylesheet" type="text/css" media="screen" title="default" href="http://jerseytest.forumotion.asia/129813-ltr.css"></link>

<link rel="alternate stylesheet" type="text/css" media="screen" title="theme1" href="http://jerseytest.forumotion.asia/125820-ltr.css"></link>

<link rel="alternate stylesheet" type="text/css" media="screen" title="theme2" href="http://jerseytest.forumotion.asia/100031-ltr.css"></link>


</head>

<body background="{T_BODY_BACKGROUND}" bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}">
<form id="switchform">

<!-- Choose theme 1 -->
<input type="radio" name="choice" value="default" onClick="chooseStyle(this.value, 60)">Default Theme<br>

<!-- Choose theme 2 -->
<input type="radio" name="choice" value="theme1" onClick="chooseStyle(this.value, 60)">Theme 1 Name<br>

<!-- Choose theme 3 -->
<input type="radio" name="choice" value="theme2" onClick="chooseStyle(this.value, 60)">Theme 2 Name
</form>

... (rest of the script)

5. Published the template
6. The radio button shows on the web page, but it doesn't do anything Sad

any help ?

Cheers,

114Accespted Re: Forumotion Theme Changer! Fri Aug 27, 2010 1:03 pm

ankillien

ankillien
Administrator
Administrator
Hi acman!

When you create the HTML page to put the scripts, Select 'NO' for 'Do you wish to use your forum header and footer ?'

It should work than Very Happy

115Accespted Re: Forumotion Theme Changer! Fri Aug 27, 2010 2:48 pm

acman


Registered Member
Registered Member
Hi,

done that.. but still the radio button doesn't work, as in it doesn't change anything Sad

if you want, i can give you the admin password, for you to check Very Happy

as that's only test forum, there's nothing there.. Smile

116Accespted Re: Forumotion Theme Changer! Fri Aug 27, 2010 5:19 pm

ankillien

ankillien
Administrator
Administrator
Code:
<!--This script should appear below your LINK stylesheet tags -->

<script src="styleswitch-h2.htm" type="text/javascript">

/***********************************************
* Style Sheet Switcher v1.1- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
***********************************************/

</script>

1) The above part must go below all the <link> tags.

2) Also, the link tags can't be closed that way. See the tutorial how the link tags are closed.

3) <script src="styleswitch-h2.htm" type="text/javascript"> try using the full path to the page. Like this...

Code:
<script src="http://jerseytest.forumotion.asia/styleswitch-h2.htm" type="text/javascript">

117Accespted Re: Forumotion Theme Changer! Fri Aug 27, 2010 6:14 pm

acman


Registered Member
Registered Member
Hi, thanks for the guide, now i've modified the overall_header_new template as this :

...

<link rel="alternate stylesheet" type="text/css" media="screen" title="default" href="http://jerseytest.forumotion.asia/129813-ltr.css" />

<link rel="alternate stylesheet" type="text/css" media="screen" title="theme1" href="http://jerseytest.forumotion.asia/125820-ltr.css" />

<link rel="alternate stylesheet" type="text/css" media="screen" title="theme2" href="http://jerseytest.forumotion.asia/100031-ltr.css" />

<script src="http://jerseytest.forumotion.asia/Theme-Changer-h1.htm" type="text/javascript"></script>

</head>
<body background="{T_BODY_BACKGROUND}" bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}">
<form id="switchform">

<!-- Choose theme 1 -->
<input type="radio" name="choice" value="default" onClick="chooseStyle(this.value, 60)">Default Theme<br/>

<!-- Choose theme 2 -->
<input type="radio" name="choice" value="theme1" onClick="chooseStyle(this.value, 60)">Theme 1 Name<br/>

<!-- Choose theme 3 -->
<input type="radio" name="choice" value="theme2" onClick="chooseStyle(this.value, 60)">Theme 2 Name
</form>

...


but i still got the same result after saving & publish the changes Sad

118Accespted Re: Forumotion Theme Changer! Fri Aug 27, 2010 6:46 pm

ankillien

ankillien
Administrator
Administrator
The code inside your head tags should look like this.....

Code:
<link rel="alternate stylesheet" type="text/css" media="screen" title="default" href="http://jerseytest.forumotion.asia/129813-ltr.css" />

<link rel="alternate stylesheet" type="text/css" media="screen" title="theme1" href="http://jerseytest.forumotion.asia/125820-ltr.css" />

<link rel="alternate stylesheet" type="text/css" media="screen" title="theme2" href="http://jerseytest.forumotion.asia/100031-ltr.css" />

<script src="http://jerseytest.forumotion.asia/Theme-Changer-h1.htm" type="text/javascript"></script>

<!--This script should appear below your LINK stylesheet tags -->

<script src="http://jerseytest.forumotion.asia/styleswitch-h2.htm" type="text/javascript">
/* * Style Sheet Switcher v1.1- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more */
</script>

119Accespted Re: Forumotion Theme Changer! Fri Aug 27, 2010 9:50 pm

acman


Registered Member
Registered Member
ok.. got that..

but still no effect Sad

120Accespted Re: Forumotion Theme Changer! Fri Aug 27, 2010 10:15 pm

ankillien

ankillien
Administrator
Administrator
I don't find this part in your forum...

Code:
<script src="http://jerseytest.forumotion.asia/Theme-Changer-h1.htm" type="text/javascript"></script>

I think you have forgotten to add it. It should be there in head tags.

121Accespted Re: Forumotion Theme Changer! Sat Aug 28, 2010 12:24 am

acman


Registered Member
Registered Member
aahh it works after i change my default skin to default version..

thanks for the tip Smile

but where should i put the script if i want to put it as in this forum ?

122Accespted Re: Forumotion Theme Changer! Sat Aug 28, 2010 12:42 am

Guest


Guest
The best coder ever been on forumotion! All the best

123Accespted Re: Forumotion Theme Changer! Sat Aug 28, 2010 8:52 am

ankillien

ankillien
Administrator
Administrator
@acman,

Glad I could help buddy Very Happy

Here we are using completely different technique for the theme changer and we would not prefer to make it public, sorry.

@Nick,

I am not really the best Razz



Last edited by ankillien on Wed Sep 01, 2010 7:14 pm; edited 1 time in total

124Accespted Re: Forumotion Theme Changer! Wed Sep 01, 2010 6:56 pm

C.noergaard

C.noergaard
Registered Member
Registered Member
Cool very cool i will use that!

125Accespted Re: Forumotion Theme Changer! Wed Oct 06, 2010 3:49 am

vi3tkid277


Registered Member
Registered Member
need>help. :d
selection not working.
can select from the dropdown menu but nothing happens.
mabi-hs.forumotion.net

126Accespted Re: Forumotion Theme Changer! Wed Oct 06, 2010 8:57 am

ankillien

ankillien
Administrator
Administrator
Hi,

I noticed that on your html page where you have added the javascript, you have chosen to show FM header and footer.

You need to remove that by going to HTML page management > edit your html page > Do you wish to use your forum header and footer ?

Se it to 'No' and save Smile

Sponsored content


View previous topic View next topic Back to top  Message [Page 5 of 7]

Go to page : Previous  1, 2, 3, 4, 5, 6, 7  Next

Permissions in this forum:
You cannot reply to topics in this forum