W-script Wallpaper Script


W-script premium wallpaper script is back!

How to add new pages

This ques­tion was posted today on the sup­port forum so it’s a decent one to cre­ate a tuto­r­ial about it.

Hi, i want add page, like “About”, “Pri­vacy Pol­icy”
How to do it?

It’s a lit­tle com­pli­cated because W-script is not devel­oped to sup­port such func­tion­al­ity but not very hard to add new pages. Fol­low­ing this tuto­r­ial you will learn how to cre­ate new pages using PHP.

First, let’s assume we need to add a “About us” page. Let’s cre­ate a new PHP page called about.php and upload it to system/application/controllers. Now open that file in your edi­tor and place the fol­low­ing content:


class About extends Controller {

        function __construct () {
                parent::Controller ();

        function index () {
                $right = get_right_side_content ();

		$page = array
			'content'	=>	file_get_contents ( ROOTPATH . '/pages/about.txt' ),
			'right'		=>	$right,
			'header_msg'	=>	"About us"

		$page = assign_global_variables ( $page, 'about_us' );
		load_template ( $page, 'template', TRUE );

We’re almost ready to view our page. If you go to www.yourdomain.com/index.php?/about you will prob­a­bly see a white page because we didn’t added the con­tents of our page yet. Go to the root level of your W-script instal­la­tion (where index.php sits) and cre­ate a new direc­tory there called pages. Inside this direc­tory cre­ate a new .txt file called about.txt. Add your con­tent inside that page and you should be able to view it’s con­tents by access­ing the url. You can also add html in that text file so it’s flexible.

You can link to those pages by edit­ing your footer tem­plate file: templates/default/html/footer.tpl

Why is W-script skipping wallpapers

I think this is the most com­mon ques­tion so far and the answer is quite sim­ple. I was asked this ques­tion since the begin­ning of W-script so let’s clar­ify it once and for all.

W-script is a wall­pa­per script and not an image gallery. With that being said you should know that it val­i­dates sizes. The sizes of the wall­pa­pers being uploaded, either via bulk upload or sim­ple upload, are val­i­dated and matched against stan­dard sizes (800×600,1600×1050 etc). If the wall­pa­per is miss­ing 1 pixel (800×599), it will be ignored since there is no res­o­lu­tion with that size.

It may sound like a bug. We care about qual­ity and main­tain­ing ratio and you should be happy this fea­ture is included (yes, it’s a fea­ture) and that your web­site only allows qual­ity wall­pa­pers and fol­lows standards.

If you’re frus­trated about this “fea­ture” think about your vis­i­tors who are down­load­ing wall­pa­pers which do not match their screen sizes.

Here is the full list of accepted sizes (v3.0):
1200 => 1600
768 => 1024
864 => 1152
1024 => 1280
1440 => 1920
1920 => 2560
800 => 1280
900 => 1440
1050 => 1680
1200 => 1920
1600 => 2560
960 => 1280
600 => 800
272 => 480
480 => 320
1260 => 1680

Detailed w-script installation instructions

Hav­ing prob­lems installing w-script? Read this.

!!Some parts here is from per­sonal expe­ri­ence only and may be wrong due to the lack of proper doc­u­men­ta­tion, if you know bet­ter please comment

First of all, down­load lat­est w-script ver­sion, there should be large green but­ton some­where in this page.

Unzip the package.

Fire up your favorite FTP client, if you don’t have one, I’d sug­gest using FileZilla, install and usage instruc­tions are on their site.
Upload all the files from folder wscript to your host.
The uplouad takes a few min­utes, so mean­while go to your host’s CPanel (usu­ally yourdomain.com/cpanel) Find the sec­tion Data­bases there and click on MySQL® Data­base wizard.

In the next win­dow enter the data­base name, in this exam­ple it will be “walls” click next.
There you enter data­base user name and pass­word, I usu­ally use the same name I used for the data­base, so user name is “walls” too. enter pass­word twice, click “Crate user”.
In next win­dow you will see this text:

Added user “hellkern_walls” with pass­word “Your­Pass­word”.
Step 3: Add User to the Data­base
User: hellkern_walls
Data­base: hellkern_walls

(instead of “hel­lk­ern” there will be your data­base prefix)

Now !!Impor­tant select “All Priv­i­leges” and click next.

There is text:

Step 4: Com­plete the task
User hellkern_walls was added to the data­base hellkern_walls.

Go back to your FTP client, the file trans­fer should be fin­ished now, if not wait for a bit.
Make sure you chmod all the nec­es­sary files cor­rectly. Use this tuto­r­ial.

Go to yourwebsite.com and the instal­la­tion screen should appear.

Field name / What to enter there
Host­name / leave it al “local­host” , if it does not work use “ftp.yourwebsite.com” or other link, if your host­ing pro­vided one.
Data­base name / Your DB name, in this exam­ple “hellkern_walls“
Data­base User / Your DB user, in this exam­ple “hellkern_walls“
Data­base Pass­word / DB pass­word, in this exam­ple “Your­Pass­word“
Data­base Pre­fix / DB pre­fix, in this exam­ple “hellkern_”

Admin Pser­name / Your user name
Admin Pass­word / Your Pass­word. Use at least 8–9 char­ac­ters, may cause errors if too short (not tested)
Admin Email / Your email
Site Name / Your site name, keep it short, 3–4 words is enough, may cause errors if too long (not tested)
Site Slo­gan / Your site slo­gan, keep it short, 5–6 words is enough, may cause errors if too long (not tested)
(Will add screen­shot with prop­erly filled install form later)

And this is a screen­shot of  form with some mistakes:


Try to guess how many are there :D

Press “Per­form instal­la­tion” if every­thing is ok, you should get text like “delete instal­la­tion folder to con­tinue”, if not make sure you did all the steps exactly as writ­ten here. If thete is still error please post a screen­shot of it in the Sup­port Forum.
Delete folder “install” from your host.

(Optional, use only if you wan’t usee SEO friendly url’s and rank bet­ter in search engines)
Once instal­la­tion is fin­ished log in to your web­site, go to Manage->Site Set­tings
In there go to Set­tings tab, cose to the bot­tom there are a set­ting “Enable mod_rewrite”. Choose yes and click save.
Now this will prob­a­bly mess up the whole site, but don’t worry, here is a fix: go to your FTP client and delete file .htac­cess (You might need to enable “Show Hid­den Files” set­ing in your FTP client to see it)
Open the folder “wscript” you downloaded/unzipped ear­lier, take file _htaccess, copy it to your host and rename as .htac­cess there. !!Impor­tant Make sure the new .htac­cess is CHmod­ded as 644, or you might just get hacked..

I hope this helped, if you have any sug­ges­tions or ques­tions please com­ment.

Detailed Widget Creation Tutorial For W-script

I decided to write a tuto­r­ial about how to cre­ate cus­tom wid­gets from scratch.
Tips, tricks and expla­na­tions shown here will be use­ful not only for cre­at­ing wid­gets,
but also teach some basic knowl­edge about how things works in W-script.
This is mostly for new­bie users, but maybe even some­what advanced users may find some­thing useful.

Each para­graph includes one or two exam­ples of code, impor­tant parts are bold.
When you need to insert cus­tom code in exist­ing file it will be shown like this:

Approx­i­mate line num­ber where to insert code
one or two lines of exist­ing code, so you know pre­cisely where the code is sup­posed to be
//comment like this or <!– == like this == –> to define start of cus­tom code
exam­ple of code
//end com­ment
few more lines of exist­ing code

!! The code exam­ples from this post might con­tain errors due to the Word­Press text formatting.

Bet­ter down­load code exam­ples from  http://hellkern.com/mod.zip or http://www.w-script.com/download/code%20hacks/custom%20modules.zip


First file to cre­ate is the wid­get itself.

Copy file templates\default\html\section_advertisements.tpl
Rename it as:  section_custom_1.tpl
(or any­thing you want, but the exten­sion must remain “.tpl” and you must remem­ber or write down name of this file, it will be needed later)
Open the file with your favorite code edi­tor (Notepad++ works just fine)
Delete all the con­tent and replace it with:

<h2 class=“headers” id=“cstm”>
<span class=“ui-icon ui-icon-heart c3”>&nbsp;</span>
<span class=“ui-icon ui-icon-triangle-1-w c4”>&nbsp;</span>
<div id=“custm” class=“hidden”>
{if  CUSTOM_1 != ”}
<div style=“padding:10px 36px 10px 36px”></div>


!! Impor­tant, all the vari­ables used here are case sen­si­tive, “CUSTOM_1″ is NOT the same as “custom_1″ Don’t for­get that
id=“cstm”> This is the ID of this wid­get. In this exam­ple it’s “cstm” . You may call it what­ever you wan’t, but the name must be unque for ewery wid­get. Just use “cstm2″, “cstm3″ and so on for other wid­gets. Remem­ber that name for later use.

ui-icon ui-icon-heart c3″> Here “ui-icon-heart” is the small icon what appears on left side of the wid­get. If you want to change widget’s icon open \templates\default\images\icons\ui\ui-icons_cccccc_256x240.png and choose what icon you want for the wid­get, then open \templates\default\css\jquery\ui.css and try to locate icons you just chose, start­ing from line 92, it should not be too hard to under­stand what is what there.. Finally replace “ui-icon-heart” with the icon you chose from ui.css

{‘custom_1′|Lang} Here “custom_1″ rep­re­sents string from the lan­guage file. This too needs to be unique for every wid­get, I’ll explain later how to add cus­tom strings to lan­guage file.

<div id=“custm” This is ID for Wid­gets Con­tent, must be unique.

{if CUSTOM_1 and const.CUSTOM_1|base64 Here “CUSTOM_1″ rep­re­sents the code that will be vis­i­ble in this wid­get. This If/else state­ment checks if the code has been added. Name must be unique.


This part adds the new wid­get to the sidebar.

Next, edit file: \system\application\config\sections.php

At the end add:
// cus­tom side­bar hack
$sec­tions [ ‘section_custom_1′ ] = array (
’title’ => ‘Cus­tom wid­get 1′, ‘descrip­tion’ => Lang ( ‘custom_w_1′ ), ‘show’ => TRUE, ‘order’ => 1


[ ‘section_custom_1′ ] This is the name of the widget’s file you cre­ated in 1st step, only with­out “.tpl” exten­sion.
’Cus­tom wid­get 1′ This is title of wid­get, write what­ever you want, this title is only seen in wid­get set­tings panel..
Lang ( ‘custom_w_1′ ) Lan­guage string for widget’s description.


Edit file: \templates\default\js\custom.js
This part keeps wid­get col­lapsed or uncol­lapsed depend­ing on cookie
Line ~ #48

if($.cookie(‘pw’)!=‘hidden’){$(‘#pw’).removeClass(“hidden”);$(‘#pc > span.c4’).removeClass(‘ui-icon-triangle-1-w’).addClass(‘ui-icon-triangle-1-s’);}
//custom side­bar hack
if($.cookie(‘custm’)!=‘hid­den’){$(‘#custm’).removeClass(“hidden”);$(‘#cstm > span.c4’).removeClass(‘ui-icon-triangle-1-w’).addClass(‘ui-icon-triangle-1-s’);}
//end of cus­tom side­bar hack
if($.cookie(‘cocw’)!=‘hidden’){$(‘#cocw’).removeClass(“hidden”);$(‘#coc > span.c4’).removeClass(‘ui-icon-triangle-1-w’).addClass(‘ui-icon-triangle-1-s’);}

This part allows users to collapse/uncollapse wid­get and writes a cookie about it..
Line ~#126

//custom side­bar hack
$.cookie(‘custm’, null, cookie_options);
$(‘#cstm > span.c4’).removeClass(‘ui-icon-triangle-1-w’).addClass(‘ui-icon-triangle-1-s’);
else {
$.cookie(‘custm’, ‘hid­den’, cookie_options);
$(‘#cstm > span.c4’).addClass(‘ui-icon-triangle-1-w’);
//end cus­tom side­bar hack
func­tion changebg(newbg){


custm” and “cstm” must be the same vari­ables you used in the first step.


I *think* that this part takes the code you will soon enter in admin’s panel and pushes it to the wid­get (not 100% sure, I’m a new­bie mysely, but this works)
Edit file: \system\application\controllers\admin.php
Line ~ #376

$set­tings [ ‘SMTP_PASS’ ] = prepare_constant ( ” );
//custom side­bar hack
$set­tings [ ‘CUSTOM_1′ ] = prepare_constant ( base64_encode ( $this->input->post ( ‘CUSTOM_1 ) ) );
//end of cus­tom side­bar hack
$set­tings [ ‘LANG_TYPE’ ] = prepare_constant ( $this->input->post ( ‘LANG_TYPE’ ) );

CUSTOM_1′ is the same vari­able you used in the first step.

User Friendly Interface.

This part cre­ates a new tab in admin’s panel, and allows you to edit wid­gets code with ease.
Line ~ #14

<li><a href=“javascript:void(0)” onClick=“ShowTab(7)” id=“tab7”>Design</a></li>
<!– ===Add The line Bel­low=== –>
<li><a href=“javascript:void(0)” onClick=“ShowTab(8)” id=“tab8”>x</a></li>
<!– ========================== –>



This adds tab named “x” Do not use longer name, there is not enough space in admins panel.
Line ~ 506

<li class=“clear”>&nbsp;</li>
<!– ============ cus­tom =============== –>
<div id=“div8” style=“display:none”>
<label class=“description” for=“CUSTOM_1″>{‘custom_w_1′|@Lang}</label>
<div align=“left”>
<textarea name=“CUSTOM_1″ class=“element textarea small” id=“CUSTOM_1″>{‘CUSTOM_1′|@form_validation_get_value:$smarty.const.CUSTOM_1|base64_decode}</textarea>
<p class=“guidelines”><small>{‘g_custom_1′|@Lang}</small></p>
<!– =========end of cus­tom =========== –>


This code adds a textbox in this tab and con­nects it with admin.php.

CUSTOM_1′ the same vari­able as in wid­get and admin.php
custom_w_1″ Descrip­tion lan­guage string
g_custom_1’ Guide­lines lan­guage string

Lan­guage Strings

Add new words and names.
Edit File: \language\english.php
Line ~ 9

$lang [ ‘charset’ ] = ‘UTF-8′;
// Reserved vari­able <–
// cus­tom side­bar hack
$lang [ ‘custom_1’ ] = ‘Cus­tom Side Bar 1 Title’;
$lang [ ‘custom_w_1′ ] = ‘Cus­tom Side Bar 1 descrip­tion’;
$lang [ ‘g_custom_1′ ] = ‘Enter here what you want to see in cus­tom side Bar 1′;
// end of cus­tom side­bar hack
$lang [ ‘cat_details’ ] = ‘Click this icon to access more options for this category’;

This one is pretty self explanatory

Cre­ate More Widgets.

Repeat steps 1–4 and 6 but use dif­fer­ent names for the vari­ables (“CUSTOM_1″, “cstm”, “custm” and others)

Only step 5 is a dif­fer­ent. Instead of cre­at­ing new tabs just add new textboxes in the same tab, like this:

<!– ================ cus­tom 1============== –>
<div id=“div8” style=“display:none”>
<label class=“description” for=“CUSTOM_1″>{‘custom_w_1’|@Lang}</label>
<div align=“left”>
<textarea name=“CUSTOM_1″ class=“element textarea small” id=“CUSTOM_1″>{‘CUSTOM_1′|@form_validation_get_value:$smarty.const.CUSTOM_1|base64_decode}</textarea>
<p class=“guidelines”><small>{‘g_custom_1′|@Lang}</small></p>
<!– ================ cus­tom 2================ –>
<label class=“description” for=“CUSTOM_2″>{‘custom_w_2′|@Lang}</label>
<div align=“left”>
<textarea name=“CUSTOM_2″ class=“element textarea small” id=“CUSTOM_2″>{‘CUSTOM_2′|@form_validation_get_value:$smarty.const.CUSTOM_2|base64_decode}</textarea>
<p class=“guidelines”><small>{‘g_custom_2′|@Lang}</small></p>
<!– ================= cus­tom 3=============== –>
<label class=“description” for=“CUSTOM_3″>{‘custom_w_3′|@Lang}</label>
<div align=“left”>
<textarea name=“CUSTOM_3″ class=“element textarea small” id=“CUSTOM_3>{‘CUSTOM_3′|@form_validation_get_value:$smarty.const.CUSTOM_3|base64_decode}</textarea>
<p class=“guidelines”><small>{‘g_custom_3’|@Lang}</small></p>

Usage instruc­tions and file sam­ples are in this post: http://www.w-script.com/how-to-make-custom-modules/

If you have any ques­tions please com­ment!

Useful tool for modifying W-script

If you have tried to mod­ify any scripts you should know how hard it is to find what file does what function.

For exam­ple when I started to make the cus­tom mod­ule hack, first file I opened was section_advertisements.tpl

In there I noticed this part:

{if AD_CODE != ”}

Even with my lim­ited pro­gram­ming knowl­edge I under­stood that this part checks for some­thing named “AD_CODE

I fig­ured that this must be where the code from admin panel’s adver­tise­ment part is inserted, and that’s just what I needed for mak­ing cus­tom widgets.

Now I only needed to find what files are using “AD_CODE” so I could mod­ify them too.

Of course man­u­ally look­ing in all the files one by one would be insane, so I present to you

“Hard Disc Search”

It can search in mul­ti­ple text files at the same time, and is totally free.

How To Use

Go to above link, to check out their stuff, or use  this direct link.

Unzip the file anywhere.

Run it.

Add line “.tpl” and another line “.css” with­out quotes in the left side text box with file types.

Press but­ton “Browse” and locate folder with a copy of w-script you are editing.

Enter what are you search­ing in in the large text box in the middle.

Click “Start Search” and it will find all text files con­tain­ing your search term.

Con­grat­u­la­tions, you just sawed few hours of bor­ing work :D

I hope you like this, and please com­ment if  some­thing is not right here.

How to change category name highlight

If you have noticed than on almost all W-script Wall­pa­per Script sites when you hover over a name of a cat­e­gory in right side­bar, the whole line high­lights. Per­son­ally I don’t like it so here is how to fix it.

Open \templates\default\css\default.css
with Notepad++ or some other code edi­tor, and find line #205

It should look like:
.desc tr:hover {background:#000;}

Now delete this line to remove high­light, or mod­ify it to use dif­fer­ent highlight color…

NOTE: If you change CSS,  the Fire­fox plu­gin Fire­bug is really help­ing. See this:


How to make custom modules

How to make cus­tom mod­ules for W-script Wall­pa­per Script? I did what Free­lan­cenoob sug­gested in one of his posts and copied that adver­tise­ment side­bar and cus­tomized it a bit… I did also make some changes to admin set­tings page and some other files, so you have three more wid­gets to play with.

This tuto­r­ial must be tested, please, help! Does it work for you?

Please use at your own risk, I am not a coder nor pro­gram­mer, and all the mod­i­fi­ca­tions were done guid­ing by YouTube tuto­ri­als and stuff like that.
Make a backup of the script before con­tin­u­ing.
Also, DO NOT use this if you have mod­i­fied the theme or changed some­thing there, because this will prob­a­bly ef the whole thing up…

All the mod­i­fied files are here:


or here:


There are:
english.php (mod­i­fied, because I needed to use few more words)

custom.js (mod­ded, so you can collapse/uncollapse these wid­gets as good as originals)

section_custom_1.tpl section_custom_2.tpl and section_custom_3.tpl
(The widgets)

(Mod­ded so you can move the wid­gets up and down & enable/disable them just like originals)

(Adds a new sec­tion to admins panel, so you can eas­ily add con­tent to wid­gets like a pro :D )

(This is the thing that con­nects what you input in the set­tings panel and what is shown in wid­get.. At least I think so, well actu­ally I have no idea, but with­out this it does not work..)

I com­mented all changes as
//custom side­bar hack
or some­thing sim­i­lar, so you can see what is done there and make some awesome mods!

How to make work cos­tom mod­ules for W-script Wall­pa­per Script

Step 1

Edit english.php
close to the top there are 3 lines like:
“Cus­tom Side Bar 1 Title“
Change them to what­ever title you want, don’t change any­thing else if you don’t know what you are doing..

Step 2

Optional, change icons of wid­gets:
(not included, since i didn’t mod­ify it)
and choose what icons you want for the wid­gets
then open \templates\default\css\jquery\ui.css and try to locate icons you just chose, start­ing from line 92, it should not be too hard to under­stand what is what there..
Finally edit section_custom_1.tpl (and other 2 after that)
In line 2 change ui-icon-heart to the icon you chose from ui.css

Step 3

goes to \language

goes to \templates\default\js

goes to \templates\default\html

goes to \system\application\config

goes to \templates\default\forms

goes to \system\application\controllers

How to use your new Cus­tom Mod­ules for W-script system

Log in as admin, goto Manage->Site settings->Widgets to move around and turn on/off your new wid­gets.
Then go to Manage->Site set­tings, you should notice that a new tab called ‘x’ has appeared (couldn’t use longer name, or it would make that thing look nasty..) click on that x and there are 3 boxes where you can enter a code what you want to use (html work’s , Java should too, plain text does not look good..)
If there are some weird char­ac­ters in the boxes just delete them and paste your code there and click save. that’s about it…

As i men­tioned, I don’t give any war­ranties, use at your own risk..
If some­thing does not work, then SLOWLY read these instruc­tions once again

Author of W-script

There were ques­tions about this, so let me explain it. I am not the orig­i­nal author of W-script. The guy who made it dis­s­a­peared from the Inter­net, nobody knows where. I am even not sure of his actual (real world) name. But for­tu­nately the code has been pub­lished under GNU 3 with basic rights such as: any­body can copy, mod­ify, share the code in any way. In this way, Linux (or W-script) never dies and belongs to the com­mu­nity, not a per­son or a com­pany. I would like to state some­where real authors name, but he did not write it to the W-script licence file. So, we must wait if he will show up some day. Till the time we can help each other, not just sit and watch the world twisting.

Translating W-script Wallpaper Script

You are ask­ing how it is pos­si­ble to trans­late W-script Wall­pa­per Script. Well, it is really easy. This is what I use:

1) open your instal­la­tion of W-Script Wall­pa­per Script in FTP client (I use SmartFTP)
2) go to language/english.php
3) down­load this file to your machine
4) open it in a text edi­tor, I use PSPad
5) replace eng­lish strings with desired lan­guage strings

note: It is not needed to trans­late every­thing, start­ing with it, trans­late just core strings vis­i­ble on home­page, e.g. admin­is­tra­tion can be in EN, no prob­lem — but if you have time and want to work, why not

6) upload it back
7) reload (F5) your page in browser to see changes
FINALLY: we shared the whole script with you, so share the trans­lated file with us, please!

Do you have old materials?

Do you have some stuff from the old hacked site being down for a long time? Some older ver­sions of W-script, mod­ules, trans­la­tions, themes, web texts, off-line forum,something? Please, send it to me, so we can get back and con­tinue devel­op­ing this great wall­pa­per script!  Please, use this mail: mike@w-script.com. Thank you!


W-script Wallpaper Script Screenshot

W-script: The Full Featured Wallpaper Site Creator Script

It takes min­utes to setup and start earn­ing money from your new web­site. If you need a seri­ous script to man­age your wall­pa­per site like a PRO then W-script wall­pa­per script is the right solu­tion, in front of the aver­age com­pe­ti­tion with giant steps.