Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum

Get help for TinyWebGallery, the best image gallery. The forum is also home for the Joomla JFUploader, TWG Flash Uploader and the Wordpress flash uploader.
It is currently 11. Dec 2017, 11:15

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: 16. Nov 2016, 01:38 
Offline

Joined: 16. Nov 2016, 01:24
Posts: 6
I'm trying to get the external auto-height workaround to work, but having no luck. I'm not sure if it's my options or something missing on the external site in the javascript?

I added the following code in the body of the external site:
Code:
<script src="http://www.***.com/wp/wp-content/plugins/advanced-iframe/js/ai_external.js"></script>
(actual domain below)

On the local site, I have set the option to "External" for "Resize remote iframe to content height" in the "External workaround" tab.

I have added enable_external_height_workaround="true" to the default shortcode on the page where the iframe is displayed.

Here is the URL of the local page with the iframe: http://tinyurl.com/glcas9r pass: HireD3sk4%}

I have the height set to 300 pixels by default. So when the iframe loads initially, it shows up perfectly, but as soon as I click on one of the job listings inside the iframe, it seems doesn't adjust the height of the iframe, and just shows a scrollbar instead.

I would appreciate your assistance!


Last edited by Europhoric on 18. Nov 2016, 22:40, edited 1 time in total.

Top
 Profile  
 
PostPosted: 16. Nov 2016, 10:02 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 10571
Hi,

it seems to work fine with Firefox but not in Chrome.
Can you verify this.

I'll check what could be the problem in Chrome

Best, Michael


Top
 Profile  
 
PostPosted: 16. Nov 2016, 10:19 
Offline

Joined: 16. Nov 2016, 01:24
Posts: 6
Yes, I can confirm it works fine in Firefox and IE, but not Chrome.


Top
 Profile  
 
PostPosted: 16. Nov 2016, 10:22 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 10571
The problem is that chrome cannot measure the body content correctly.
You need to specify the element you want to measure.

add

<script>
element_to_measure="#TPLayoutTbl";
</script>

before the
<script src="http://www.***.com/wp/wp-content/plugins/advanced-iframe/js/ai_external.js"></script>

I have not found the reason why the outer element returns a height of 0 - seems a chrome bug/feature ...

Best, Michael


Top
 Profile  
 
PostPosted: 16. Nov 2016, 10:27 
Offline

Joined: 16. Nov 2016, 01:24
Posts: 6
Ok thanks! I will give it a try.


Top
 Profile  
 
PostPosted: 17. Nov 2016, 02:49 
Offline

Joined: 16. Nov 2016, 01:24
Posts: 6
So we tried adding the code you suggested to the external site but it didn't seem to have any effect in Chrome.

Interestingly, it actually stopped working now in all browsers (Firefox & IE), and doesn't show the scroll bar any more either. It seems to stay stuck at a certain height.

Thanks for your help.


Top
 Profile  
 
PostPosted: 17. Nov 2016, 12:11 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 10571
Just checked the code:

element_to_measure="TPLayoutTbl";

the hash is too much - it is not needed by the function I use here.

Best,
Michael


Top
 Profile  
 
PostPosted: 18. Nov 2016, 22:40 
Offline

Joined: 16. Nov 2016, 01:24
Posts: 6
It worked! Thank you so much for your help.


Top
 Profile  
 
PostPosted: 19. Nov 2016, 01:56 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 10571
Great.

Glad I could help.

do you think an error message would help if I detect a problem like this?
Because than I would add this to the next version.

Feel free to vote on codecanyon ;).

Best, Michael


Top
 Profile  
 
PostPosted: 19. Nov 2016, 07:18 
Offline

Joined: 16. Nov 2016, 01:24
Posts: 6
Yeah I think an error message would be helpful.

To be honest, I found the entire "External Workaround" tab very confusing at first as I wasn't clear which code to use. I would split it up in sub-tabs, for either Subdomain or External site. I feel this section can be simplified a lot to make it easier to understand as it feels very overwhelming and confusing (even for me as a experienced developer).

It took me over an hour to even realize I had to add a javascript on the external site as this wasn't clear to me until I read some of the support tickets. It would be great to have something like "step 1: add code on external site, step 2: add this line to the shortcode...", etc.

Thanks again for your help.


Top
 Profile  
 
PostPosted: 20. Nov 2016, 08:35 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 10571
I check how to improve this.

Because

1. Add the following Javascript to the external web page you want to show in the iframe (The optimal place is before the </body> if possible. Otherwise put it in the head section. NEVER place it just after the <body> as than the height of the script element would be measured!):

<script src="http://www.tinywebgallery.com/blog/wp-content/plugins/advanced-iframe/js/ai_external.js"></script>

2. Check if the wordpress site url (var domain=) in this file points to your wordpress root. Click here to open this file and check the variable domain at the top. If the url is not o.k. please set the correct url in the file ai_external.template.js. If the file can not be created please change the permissions of this folder.
3. Add enable_external_height_workaround="true" to your shortcode! This is needed to disable the settings with the for the same domain.
4. Enable the workarounds you want to use below.

Is what you asking for and this is the existing text.

Best, Michael


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO