Introducing Item Switcher...


#121

Not absolutely clear explained, can you explain step by step!

  1. I created a directory on the server and now I have two folders site.com and themes.site.com - is that correct?
  2. In new directory themes.site.com i must past this files from archive - themeselector? and make redirect or what? but all my themes in folder site.com!

#122

Can you help, how to show only mine Iframe? Not both…


#123
manserro5 said

Can you help, how to show only mine Iframe? Not both…

I am also having this issue. Maybe it used to close automatically and Envato changed something about their iframe and it’s not closing anymore? Does anyone have a solution?


#124

Did you guys follow step 3 with the redirect?


#125
sevenspark said

Did you guys follow step 3 with the redirect?

Oops somehow I ended up using just the ?theme= and forgot to add the redirect.php in front, thanks!


#126

This is awesome! Def a brilliant piece of code ill be using!

Finally found what I was looking for!


#127

Just wanted to add a big THANKS!

This is pure magic. :slight_smile:


#129
arrowthemes said

Thanks for the code, George :wink:

Here’s my modified version: http://demo.arrowthemes.com/redirect.php?theme=clarke-joomla

If you’ve noticed when you first load the preview, the styles are loaded nicely and the user can switch between theme styles. However if the user selects a different theme, I’m not able to load the php array list of the selected theme via js.

What I’ve done for the styles is add it as part of the array of the theme list - that kinda makes it hard for me to pull the list using javascript, obviously due to my limited knowledge in php/js. At the moment am just setting the styles list of the selected theme to blank to avoid the previous list from being visible.

I’d appreciate some help from any one on how to load the list of styles from the php array to the javascript on click event.

Here’s my PHP array code:

http://snippi.com/s/hs4yzx4

Here’s my js click event for the theme switcher:

http://snippi.com/s/xqn66qe

many thanks,
Joel

hi mate can you share you code ???


#131

thanks a lot for sharing his files,.
:slight_smile: :smiley:
greetings.


#132

thanks… will be helpful a lot


#133

Did mine too, changed the graphics quite a bit, but thanks for the code! http://demo.teothemes.com/


#134

Hi guys,
Great code, but I can see that a lot of authors use toolbar theme switcher with test for responsive design. Would be fantastic to add this option.

Thanks.


#135

I can’t believe this was free, this is better than any paid coding I’ve ever used. I searched and searched and searched and couldn’t find anything like this before finally stumbling upon this. AMAZING piece of work. THANKS SO MUCH FOR SHARING!!!

-Eric


#136

Hi guys, can I get some help here please?

I’ve placed the code as requested in folder.something.com and done everything right. The first method listed here here was working, but the hover thing is amazing so I must have that as well. Problem is that while everything works great, it doesn’t actually display anything the first time around, so kind of a big prob.

Code:

$theme_array = array (
 
'wd'	=>	array (
"id" => "WD Responsive",
'type'	=> "Email Template",
"url" => "http://www.am-themes.com/wd_email",
"themeforest" => "http://themeforest.net/item/wd-email-clearn-responsive-email-template/4495512?ref=am_themes",
"preview"	=> "http://3.s3.envato.com/files/53628906/01_preview.__large_preview.png",
"mobile_redirect" => true,
),

and the redirected site looks like this:

http://labs.am-themes.com/?theme=wd

help?


#137

Looks like you haven’t set a theme based on your ?theme parameter.

For example, you grab that ID

$current_theme = isset($_GET['theme']) ? $_GET['theme'] : 'wd';

then you pull the URL for that ID out of your themes array, so you have a $current_theme_url

$current_theme_url = $theme_array[$current_theme]['url'];

Then you use that theme url to load the iframe in index.php

< iframe id="iframe" src="< ?php echo $current_theme_url; ?>" frameborder="0" width="100%">

Right now your iframe src is empty, so the $current_theme_url wasn’t set properly

Hope that gets you pointed in the right direction :slight_smile:


#138
sevenspark said

Looks like you haven’t set a theme based on your ?theme parameter.

For example, you grab that ID

$current_theme = isset($_GET['theme']) ? $_GET['theme'] : 'wd';

then you pull the URL for that ID out of your themes array, so you have a $current_theme_url

$current_theme_url = $theme_array[$current_theme]['url'];

Then you use that theme url to load the iframe in index.php

< iframe id="iframe" src="< ?php echo $current_theme_url; ?>" frameborder="0" width="100%">

Right now your iframe src is empty, so the $current_theme_url wasn’t set properly

Hope that gets you pointed in the right direction :slight_smile:

Thanks a lot for your help, you’re the best! I Owe you 1!


#139

Thanks bro :slight_smile:


#140

@ThemeProvince, @sevenspark
Thanks a lot, you are great :slight_smile:


#141

Hi guys!

I use a subdomain in TechnoTailor.net. It’s http://themes.technotailor.net. I copy the files, the theme selector works perfectly, but I got an error message in the header. It’s say:

Notice: Undefined index: theme in /home/technota/domains/technotailor.net/public_html/themes/index.php on line 38 Notice: Undefined variable: redirect in /home/technota/domains/technotailor.net/public_html/themes/index.php on line 56

What can I do to fix this?

Thanks!


#142

Nevermind! I fix it!

I add this line in the index.php file and the notice message is gone!

error_reporting(E_ALL ^ E_NOTICE);