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 28. Mar 2024, 23:44

This forum is readonly now. Please use the new forum if you don't find the answer to your question here. The new forum is at https://www.tinywebgallery.com/blog/forum/


All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: 18. Jul 2015, 02:29 
Offline

Joined: 18. Jul 2015, 02:13
Posts: 10
Hi,

Just bought your plugin and it works great! But I couldn't find a solution for the following problem:

I want to show just a part of an other website (different domain) so I used "Show only one element" and copied the <script>.... in the header of that website. This works fine: it is showing the right part from the website. The only problem is that it doesn't keep the original layout and style (no style at all, somehow it's not reading the css file). How can I keep the original layout and style from that other website for the part I'm showing in the iframe I'd made?

Thanks in advance.

Dean.


Top
 Profile  
 
PostPosted: 18. Jul 2015, 20:01 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
If you use the "show only one element" all other elements in the body are removed.
In you case I think the css is maybe defined in the body (where is should not be) or
the css structure does not match anymore.

In this case you should hide all emelents you don't want to see with the plugin.

Best, Michael


Top
 Profile  
 
PostPosted: 18. Jul 2015, 21:33 
Offline

Joined: 18. Jul 2015, 02:13
Posts: 10
Alright thanks, gonna give it a try. Another question: The new version of Firefox is blocking the external content, you need to disable Firefox's protection to show it. Is there something you can do about this?

Thanks in advance.

Dean


Top
 Profile  
 
PostPosted: 18. Jul 2015, 22:58 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
What is Firefox blocking? What are your urls?

I'm usining FF 39 and all my demos work fine.
e.g .http://www.tinywebgallery.com/blog/advanced-iframe/advanced-iframe-pro-demo/external-workaround-auto-height-and-css-modifications
Is the one which uses the features you use.

Or do you mix http/https?
See http://www.tinywebgallery.com/blog/iframe-do-not-mix-http-and-https

Best, Michael


Top
 Profile  
 
PostPosted: 20. Jul 2015, 00:01 
Offline

Joined: 18. Jul 2015, 02:13
Posts: 10
Yup I'd mixed up the http and https but it's already working now thanks!

One last question to get everything working.

I'm trying the following. Url's:
Dev site: mydomain.com
Dev site different page: mydomain.com/vacancies
Remote site: otherdomain.com

An external company is hosting our cms for posting vacancies (see 'remote site'). On the home page I want to show a summary of the current vacancies. This is already working. Click on 'Vacatures' (on 'Dev site') in the menu and it will show the right page. If they click on one of the links from the vacancies they should be redirected to 'Dev site different page' (still need to add 'Iframe redirect url' to get this to work). Now on this page I want to make another iframe which shows the whole external page. At the moment it is showing the summary of the current vacancies again but not the whole page. How can I get this to work?

Thanks in advance.


Last edited by Deanprinsen on 27. Jul 2015, 15:34, edited 1 time in total.

Top
 Profile  
 
PostPosted: 20. Jul 2015, 10:01 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
So you use the same shortcode there?

For the external workaround you can also configure the Javascript files by setting variables before the script or by including a config Javascript file before (see the documentation). Then you can have 2 different configurations on a remote page as well.
Or do you want to show the same page but depending on the parent with different "views"? Than you have also a configuration with a real switch where you pass an additional parameter in the url which than decides in the Javascript config files which settings to use.

Best, Michael


Top
 Profile  
 
PostPosted: 20. Jul 2015, 17:49 
Offline

Joined: 18. Jul 2015, 02:13
Posts: 10
Yes I want to display the same page (from remote domain) only with different 'views' depending on the parent page you're on. On the first parent page it should only show the 'Job list' and on the other parent page it should show the whole page (including the elements I set to hide on the first parent page)

Now I'd set all the settings in the administration panel. If I understand it right, I need to put the different settings in the script on the remote page or I need to put those settings in a config file and refer to this config site on the remote page? Is there a way the easily extract the current settings from the config file (so I know which variables I have changed)?

Thanks in advance.

Best, Dean


Top
 Profile  
 
PostPosted: 20. Jul 2015, 20:12 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
Right.

There is the "Generate shorcode" button. This gives a shortcode with all settings you have made.

In the section of the external workaround you see some examples and all parameters which are availate. Most of them match to the shortcode attributes.
In you case you need an additional if () in the config file as you want a different setup for the same page.
There you have to check window.location.href for the additional string you have in the url.

Best, Michael


Top
 Profile  
 
PostPosted: 26. Jul 2015, 18:53 
Offline

Joined: 18. Jul 2015, 02:13
Posts: 10
Sorry, I don't really get it. I went trough the examples and tried several things but noting seems to work. In the simplest way it should work with different shortcodes right?

So on the first page were the summary of the vacancies should be shown I use the following shortcode:
[advanced_iframe securitykey="..." use_shortcode_attributes_only="true" src="http://otherdomain.com/careers/index.php" scrolling="no" id="advanced_iframe" show_iframe_loader="true" enable_responsive_iframe="true" enable_lazy_load="true" iframe_hide_elements=".message,#searchFilter,.jobsat,br" change_iframe_links="a" change_iframe_links_target="_parent" enable_external_height_workaround="true" hide_page_until_loaded_external="true"]

On the second page I use the same shortcode but without: 'iframe_hide_elements=".message,#searchFilter,.jobsat,br"'. So in this case it should not hide those elements and show the full page. I think it's still using the settings from the administration and it doesn't get overwritten by the shortcode attributes. I have in the meantime erased the settings "iframe_hide_elements" in the administration so on the second page it is showing the correct view now. But now the first page is not showing the correct view. Here it only should show the summary of the vacancies ( the table with 'Job title' at the top ).

I hope you can help with this. Thanks in advance.


Last edited by Deanprinsen on 27. Jul 2015, 15:34, edited 2 times in total.

Top
 Profile  
 
PostPosted: 26. Jul 2015, 19:28 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
you are using the external workaround. So like described nothing in the shortcode like
iframe_hide_elements=".message,#searchFilter,.jobsat,br" change_iframe_links="a" change_iframe_links_target="_parent"
work as this settings are only for the SAME domain.

If you set them in the administration they are saved to ai_external.js!
And only the settings in the ai_external.js are used!
This is what I wrote - you need to configure the ai_external.js like described in the external workaround section. Additionally you need a switch in this config as I have already written.

Best, Michael


Top
 Profile  
 
PostPosted: 27. Jul 2015, 04:55 
Offline

Joined: 18. Jul 2015, 02:13
Posts: 10
Sorry, somehow I was a bit confused and didn't remember the shortcode attributes don't work with the external workaround if you're on a different domain.

I'm not very good at writing Javascript so I searched the internet the whole evening and came up with the following:

<script type="text/javascript">
$(document).ready(function () {
if(window.location.href === “mydomain") {
var iframe_id = "vacaturelijst";
var iframe_hide_elements = ".message,#searchFilter,.jobsat,br";
}
});
</script>
<script src="mydomain/wp-content/plugins/advanced-iframe/js/ai_external.js"></script>

But unfortunately it's not working and I'm stuck. Can you maybe help me a bit more with this? Maybe it would also be nice if you can include this in the newer versions of the advanced iframe plugin for people who want to do the same.

Thanks in advance.


Last edited by Deanprinsen on 27. Jul 2015, 15:32, edited 1 time in total.

Top
 Profile  
 
PostPosted: 27. Jul 2015, 09:20 
Offline
Site Admin
User avatar

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

This cannot work as you need something to distinguish the 2 calls.
You need to add a query parameter to the 2nd shortcode as I have written before.
Like ?config2=true

And this you can than check for like written below:

<script type="text/javascript">
if (window.location.search.indexOf("config2") > -1) {
var iframe_hide_elements = ".message,#searchFilter,.jobsat,br";
} else {
var iframe_hide_elements = "";
}
</script>

In the plugin is already everything to do this. Only the small switch in the config part is what you need to add.

Best, Michael


Top
 Profile  
 
PostPosted: 27. Jul 2015, 15:31 
Offline

Joined: 18. Jul 2015, 02:13
Posts: 10
Got it to work! Thank you very much.

Best, Dean


Top
 Profile  
 
PostPosted: 27. Jul 2015, 17:18 
Offline

Joined: 18. Jul 2015, 02:13
Posts: 10
I thought I was at the finish line but the following that should work seems not to work. The following I'd get directly from one of the examples. The last thing I need to get tot work is redirecting al links when vacatureshome(config2)=true. So I added 'iframe_redirect_url' to the config file but it doesn't seem to work. It only works when I change it in the administration. The code in the config looks like this now:

if (window.location.search.indexOf("vacatureshome") > -1) {
var iframe_hide_elements = ".message,#searchFilter,.jobsat,br";
var iframe_redirect_url = "http://mydomain.com/vacatures";
var change_iframe_links = "a";
var change_iframe_links_target = "_parent";
} else {
var iframe_hide_elements = "";
}

Is it not working with the switch in the config?

Thanks.

Best, Dean


Top
 Profile  
 
PostPosted: 27. Jul 2015, 19:17 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
so only iframe_redirect_url does not work but the others do?

Best, Michael


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 8 guests


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 | Datenschutz/ Privacy policy