Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 11th Jul 2011, 01:14 PM   #1
Web Marketing For Profit
War Room Member
 
Quentin's Avatar
 
Join Date: 2002
Location: Brisbane
Posts: 2,894
Thanks: 8
Thanked 1,160 Times in 528 Posts
Blog Entries: 10
Default
Running my simulator on a wordpress site
Share on: 
fb share twitter share gplus share more share

I have a simulator at Iphone mobile simulator emulator

If I add the script on a server that runs Wordpress the simulator still works but I cannot send a url to it.

So for example on the mobilesimulator.info I can send a url like this.

Iphone mobile simulator emulator

However when I try to do the same thing on a site with wordpress it blocks

So I am thinking I need to add something to the htaccess to allow it to run.

Can you help.

Q

Quentin is offline  
Unread 11th Jul 2011, 11:37 PM   #2
HyperActive Warrior
War Room Member
 
wcardinal's Avatar
 
Join Date: 2011
Posts: 133
Thanks: 15
Thanked 25 Times in 24 Posts
Default
Re: Running my simulator on a wordpress site
Share on: 
fb share twitter share gplus share more share

do you run it in an iframe in a post? It seems to work fine on this site:

tweakingwp.com/mobile-phone-simulator


wcardinal is offline  
Unread 11th Jul 2011, 11:48 PM   #3
Web Marketing For Profit
War Room Member
 
Quentin's Avatar
 
Join Date: 2002
Location: Brisbane
Posts: 2,894
Thanks: 8
Thanked 1,160 Times in 528 Posts
Blog Entries: 10
Default
Re: Running my simulator on a wordpress site
Share on: 
fb share twitter share gplus share more share

No as you cannot post a url to it.

The whole purpose of my simulator is to be able to send a url to the simulator so the customer sees their site in it.

Code:
http://mobilesimulator.info/?url=http://keymobi.info/nick/fitbits
Quentin

Quentin is offline  
Unread 14th Jul 2011, 09:36 AM   #4
Active Warrior
War Room Member
 
Join Date: 2009
Posts: 97
Thanks: 4
Thanked 14 Times in 14 Posts
Default
Re: Running my simulator on a wordpress site
Share on: 
fb share twitter share gplus share more share

yeah wordpress will block any url parameters if you are using permalinks.

if you are able to turn off permalinks on your blog then that would be the easy way.

another way would be to create a plugin to allow the parameter.

create a file like urlallow.php (you will upload to your plugins).
add the following code to that page

<?php
/* Plugin Name: Parameter
Plugin URI: Webopius - Web design | Project Management | Technology Management | SEO | Graphic Design | E-Commerce | Content Management - Richmond, Surrey, West London, UK
Description: A plugin to allow parameters to be passed in the URL and recognized by WordPress
Author: Adam Boyse
Version: 1.0
Author URI: Webopius - Web design | Project Management | Technology Management | SEO | Graphic Design | E-Commerce | Content Management - Richmond, Surrey, West London, UK
*/
add_filter('query_vars', 'parameter_queryvars' );

function parameter_queryvars( $qvars )
{
$qvars[] = 'url';
return $qvars;
}
?>

that should work (note the $qvars[] = 'url'; line allows the parameter called url
I found the solution here
WordPress › Support » Passing variables using the permalink structure
johnnyN is offline  
Unread 12th Jan 2012, 05:14 PM   #5
HyperActive Warrior
 
Join Date: 2011
Posts: 130
Thanks: 3
Thanked 8 Times in 7 Posts
Default
Re: Running my simulator on a wordpress site
Share on: 
fb share twitter share gplus share more share

I understand this is an old thread but I don't see a solution and have the same question - does anyone have a mobile phone simulator script suggestions? We'd like to have our independent sales people use our website to show clients how their websites look on mobile phones.

Our company sells Google Places services so any suggestions would be great because we would like the exposure on our website for this type of service.

You Sell Google Places Services - We Deliver The Services For You. PM Me For Details.
profitableblog is offline  
Unread 30th Jul 2012, 03:08 PM   #6
Advanced Warrior
 
Join Date: 2006
Location: , , .
Posts: 735
Thanks: 33
Thanked 144 Times in 119 Posts
Default
Re: Running my simulator on a wordpress site
Share on: 
fb share twitter share gplus share more share

Originally Posted by profitableblog View Post

I understand this is an old thread but I don't see a solution and have the same question - does anyone have a mobile phone simulator script suggestions? We'd like to have our independent sales people use our website to show clients how their websites look on mobile phones.

Our company sells Google Places services so any suggestions would be great because we would like the exposure on our website for this type of service.
We do have a mobile simulator that runs under Wordpress.

4webmaster is offline  
Unread 30th Jul 2012, 03:29 PM   #7
Active Warrior
War Room Member
 
anconsoft's Avatar
 
Join Date: 2012
Posts: 42
Thanks: 5
Thanked 2 Times in 2 Posts
Default
Re: Running my simulator on a wordpress site
Share on: 
fb share twitter share gplus share more share

I can help you building a plugin or adding an adjustment to your theme to allow that. Let me know if you want my help, PM me.
anconsoft is offline  
Unread 30th Aug 2012, 02:18 PM   #8
Happy in Acuña
War Room Member
 
Terry Jett's Avatar
 
Join Date: 2008
Location: Dallas
Posts: 2,090
Thanks: 268
Thanked 652 Times in 516 Posts
Blog Entries: 2
Default
Re: Running my simulator on a wordpress site
Share on: 
fb share twitter share gplus share more share

Quentin, did you ever get this solved so it works along side a wordpress install in sub-directory? Figure it has to do with the .htaccess file, but cannot figure it out

Surprised someone has not already built a plugin to incorporate this into a WP site so you can use the ?url=

Terry

Terry Jett is offline  
Unread 30th Aug 2012, 08:49 PM   #9
Web Marketing For Profit
War Room Member
 
Quentin's Avatar
 
Join Date: 2002
Location: Brisbane
Posts: 2,894
Thanks: 8
Thanked 1,160 Times in 528 Posts
Blog Entries: 10
Default
Re: Running my simulator on a wordpress site
Share on: 
fb share twitter share gplus share more share

No never got it sorted Terry

Q

Quentin is offline  
Unread 31st Aug 2012, 12:30 AM   #10
Resident Geek
 
stuartcryan's Avatar
 
Join Date: 2012
Location: Sydney, Australia
Posts: 11
Thanks: 0
Thanked 2 Times in 2 Posts
Default
Re: Running my simulator on a wordpress site
Share on: 
fb share twitter share gplus share more share

If you are still interested, you should be able to get around it with something like this modification below in your htaccess file:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{QUERY_STRING} !(^|&)options=com_wrapper($|&)
RewriteRule . /blog/index.php [L]
</IfModule>

note that I have an additional line stating:
RewriteCond %{QUERY_STRING} !(^|&)options=com_wrapper($|&)

what you can do is add additional RewriteCond lines that will stop it doing the redirect.

So you could add a line:
RewriteCond %{REQUEST_URI} !"/folderToExclude/" [OR] (I think I have that syntax correct *fingers crossed*) and the redirect should not happen.

Let me know how you go and I might be able to toy with it a bit more if that doesn't work.
Stuart
stuartcryan is offline  
The Following User Says Thank You to stuartcryan For This Useful Post:
Unread 31st Aug 2012, 07:44 AM   #11
Happy in Acuña
War Room Member
 
Terry Jett's Avatar
 
Join Date: 2008
Location: Dallas
Posts: 2,090
Thanks: 268
Thanked 652 Times in 516 Posts
Blog Entries: 2
Default
Re: Running my simulator on a wordpress site
Share on: 
fb share twitter share gplus share more share

Thanks Stuart! That did the trick. Can now use in sub-directory.

Now if I could just get the thing to work in a sub-domain (which is totally different than the WP issue). When adding the ?url= while in sub-domain folder it produces 500 error.

Not a biggie though. Just being able to use in WP directory is a big help.

Thank you again Stuart,

Terry

Terry Jett is offline  
Unread 31st Aug 2012, 08:01 AM   #12
Web Marketing For Profit
War Room Member
 
Quentin's Avatar
 
Join Date: 2002
Location: Brisbane
Posts: 2,894
Thanks: 8
Thanked 1,160 Times in 528 Posts
Blog Entries: 10
Default
Re: Running my simulator on a wordpress site
Share on: 
fb share twitter share gplus share more share

There is a file in there called get url which you will need to edit if you are going to put it in a sub directory

Q

Quentin is offline  
Unread 31st Aug 2012, 08:16 AM   #13
Happy in Acuña
War Room Member
 
Terry Jett's Avatar
 
Join Date: 2008
Location: Dallas
Posts: 2,090
Thanks: 268
Thanked 652 Times in 516 Posts
Blog Entries: 2
Default
Re: Running my simulator on a wordpress site
Share on: 
fb share twitter share gplus share more share

Originally Posted by Quentin View Post

There is a file in there called get url which you will need to edit if you are going to put it in a sub directory

Q
Thanks Q. Got it working in sub-directory without issues with Stuart's code.

Was talking about a subdomain, like m.google.com

Did look at the geturl.js and also the call to it from the HTML files. Tried some changes but was unsuccessful.

Terry Jett is offline  
Unread 31st Aug 2012, 04:59 PM   #14
Resident Geek
 
stuartcryan's Avatar
 
Join Date: 2012
Location: Sydney, Australia
Posts: 11
Thanks: 0
Thanked 2 Times in 2 Posts
Default
Re: Running my simulator on a wordpress site
Share on: 
fb share twitter share gplus share more share

Hi Terry,
Tried to PM you back haha but unfortunately I am too nooby to be able to (have to have 50 posts).

Are you please able to PM me the HTAccess rules you have in place (so I can have a bit of a tinkle on my own server).
Cheers
Stuart
stuartcryan is offline  
Unread 31st Aug 2012, 05:00 PM   #15
Resident Geek
 
stuartcryan's Avatar
 
Join Date: 2012
Location: Sydney, Australia
Posts: 11
Thanks: 0
Thanked 2 Times in 2 Posts
Default
Re: Running my simulator on a wordpress site
Share on: 
fb share twitter share gplus share more share

#Sigh... theres some irony MWAHAHAHA noobish enough to accidentally double post . (I maintain I hit submit, it presented me with a "preview" and then I submitted

#MyBad

Last edited on 31st Aug 2012 at 05:03 PM. Reason: Accidental Double
stuartcryan is offline  
Unread 1st Sep 2012, 11:51 AM   #16
Happy in Acuña
War Room Member
 
Terry Jett's Avatar
 
Join Date: 2008
Location: Dallas
Posts: 2,090
Thanks: 268
Thanked 652 Times in 516 Posts
Blog Entries: 2
Default
Re: Running my simulator on a wordpress site
Share on: 
fb share twitter share gplus share more share

Originally Posted by stuartcryan View Post

Hi Terry,
Tried to PM you back haha but unfortunately I am too nooby to be able to (have to have 50 posts).

Are you please able to PM me the HTAccess rules you have in place (so I can have a bit of a tinkle on my own server).
Cheers
Stuart
Hey Stuart! Sorry for delay man. Holiday weekend here and last one for the summer, so on the go

I will just post the .htaccess here. That way everyone can see:
Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{QUERY_STRING} !(^|&)options=com_wrapper($|&)
RewriteRule . /index.php [L]
</IfModule>
Appreciate your help very much. Will be on tablet rest of weekend but might be slow to respond.

Terry Jett is offline  
Unread 2nd Sep 2012, 05:35 AM   #17
Resident Geek
 
stuartcryan's Avatar
 
Join Date: 2012
Location: Sydney, Australia
Posts: 11
Thanks: 0
Thanked 2 Times in 2 Posts
Default
Re: Running my simulator on a wordpress site
Share on: 
fb share twitter share gplus share more share

Hey Terry, give this a go instead:
Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/free-simulator/.*
RewriteRule . /index.php [L]
</IfModule>
Let me know how that goes?
Stu
stuartcryan is offline  
The Following User Says Thank You to stuartcryan For This Useful Post:
Unread 2nd Sep 2012, 08:18 AM   #18
Happy in Acuña
War Room Member
 
Terry Jett's Avatar
 
Join Date: 2008
Location: Dallas
Posts: 2,090
Thanks: 268
Thanked 652 Times in 516 Posts
Blog Entries: 2
Default
Re: Running my simulator on a wordpress site
Share on: 
fb share twitter share gplus share more share

Thanks again Stuart.

Did a quick test but did not allow the ?url=

Sends to the 404 page. But staying on boat and using tablet, which is hard to work from. Not sure my text editor/ftp is not changing things. Will be back in my home office on Monday afternoon and try from real computer

I appreciate your help!

Terry

Terry Jett is offline  
Closed Thread


Bookmarks

Tags
running, simulator, site, wordpress


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 07:35 AM.