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 10. Nov 2024, 21:48

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  [ 15 posts ] 
Author Message
PostPosted: 3. Mar 2018, 21:46 
Offline

Joined: 3. Mar 2018, 21:35
Posts: 11
Hello
I have a question.
I've built a front-end page that contains an advanced_iframe that shows a back-end page. The back-end page is Add new post.
I want that when the user publishes the post (press the button publish) the plug-in shows the upload icon.
At the moment the upload icon is shown only when the parent page is first opened
Thanks in advance


Top
 Profile  
 
PostPosted: 8. Mar 2018, 12:59 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
Is the pressing triggering a page reload?

Because the loading icon is on the parent side. not on the iframe side.

Best, Michael


Top
 Profile  
 
PostPosted: 17. Mar 2018, 11:18 
Offline

Joined: 3. Mar 2018, 21:35
Posts: 11
Hi,

Exactly, the button is inside the iframe.
You're telling me that when there's a load inside the iframe, does not mean that there is also loading on the parent page. So the loading icon can't starts.

Then I'm now considering two options, and I ask you some help about they:
1. can I create new button in the parent page that trigger the button inside the iframe? can you suggest me how can I do it?
2. or, can I trigger the parent page when i press the button inside the iframe? in this case i can't modify the back-end page because e haven't the skills. Can you suggest me how can I do it?

Thanks in advance
Best regards
Alessandro


Top
 Profile  
 
PostPosted: 17. Mar 2018, 18:45 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
The problem even if the page inside would trigger a reload. When should the loading icon be started? Because the onload event of the iframe happens after the iframe is loaded. This is the event I use to hide the the loading icon!

But why do you not simply add a loading icon inside the iframe to the button directly?
And are you on the same domain or a different domain?

Best, Michael


Top
 Profile  
 
PostPosted: 17. Mar 2018, 19:18 
Offline

Joined: 3. Mar 2018, 21:35
Posts: 11
Hi,

I do not have the skills for build a preload for a back-end page. And I have not found a plug-in for preload on back-end. Can you suggest me something?

these are the two pages:
the parent:
http://ipaddress/company/wp/home/aggiungi-avvisi/
the child:
http://ipaddress/company/wp/wp-admin/post-new.php
And I have Pro version

Thanks
Regards
Alessandro


Top
 Profile  
 
PostPosted: 18. Mar 2018, 01:55 
Offline
Site Admin
User avatar

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

I think you need a custom solution. As you are on the same domain I could trigger the load icon by extending the plugin.
I don't know if the button does load a new page or works by ajax. Depending on this a different solution is needed.

But does the click really take this long?
Because normally I would simply disable the button once it is clicked.

Best, Michael


Top
 Profile  
 
PostPosted: 18. Mar 2018, 08:58 
Offline

Joined: 3. Mar 2018, 21:35
Posts: 11
Hi Michael,

Quote:
I don't know if the button does load a new page or works by ajax
The button is the classic Publish button on the wordpress admin pages (exaple in the pages: Add new post, Add new custom post).

I want to explain the problem better. I attach two images that show you the problem:
- In first i write my new post (on front-end, inside an advanced_iframe) and then I click on Publish.
Attachment:
NewPost_1.JPG
NewPost_1.JPG [ 149.82 KiB | Viewed 5820 times ]

- In the second image you can see some part (of back-end page) I had hidden with Advanced_iFrame parameters or with Adminimize or also with Advanced Acces Control.
Attachment:
NewPost_2.jpg
NewPost_2.jpg [ 185.37 KiB | Viewed 5820 times ]


So after clicking on Publish, Wordpress shows for a few milliseconds the parts that I had hidden and user can click on they. I do not want these parts to be shown.

Thanks.
Alessandro


Top
 Profile  
 
PostPosted: 18. Mar 2018, 21:09 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
I think I understand. You are showing a part of the WP administration in an iframe? Can you show me your current configuration?
Because if the loading icon is shown still the user will see the content you are hiding.

Maybe using the external workaround although you are on the same domain works for you! Because then you could e.g. include css dynamically which does hide the areas you don't like before the content is shown.

Best, Michael


Top
 Profile  
 
PostPosted: 19. Mar 2018, 09:30 
Offline

Joined: 3. Mar 2018, 21:35
Posts: 11
Hi Michael,

Yes is an administration page inside an iframe. The code i have wirtten for my front-end page is:

Code:
<a href="http://ipaddress/company/wp/home/aggiungi-avvisi/trova-e-modifica-avvisi/">Trova e Modifica Avvisi</a>
<p style="text-align: right;">[login-logout text_to_login="Login" text_to_logout="Logout" redirect="http://ipaddress/company/wp/"]   [user_login]   <a href="http://ipaddress/company/wp/wp-admin">Edit</a></p>

[advanced_iframe securitykey="SECURITYKEY" src="http://ipaddress/company/wp/wp-admin/post-new.php" id="aggiungiavvisi"
use_shortcode_attributes_only="true" width="944px" height="530px" show_part_of_iframe="true" show_part_of_iframe_x="54" show_part_of_iframe_y="58" show_part_of_iframe_width="944" show_part_of_iframe_height="330" show_part_of_iframe_allow_scrollbar_horizontal="false" show_part_of_iframe_allow_scrollbar_vertical="false"
iframe_hide_elements=".hide-if-no-js, .handlediv, .hndle, .inline-edit-group, .page-title-action, #message, #adminmenumain, #wpadminbar, #mw_adminimize_admin_bar, #footer-thankyou, #wpfooter, #footer-upgrade, #visibility, #wpchat, .wp-editor-tabs, #wp-word-count, #post-status-info, #postdivrich, .autosave-info, #minor-publishing-actions, .misc-pub-post-status, .tips, #edit-slug-box, #commentsdiv, #category-adder"
iframe_content_id="#wpcontent|.eo-grid-8|#categorydiv|#event-categorydiv|#submitdiv|#post-body-content|#post-body|#side-sortables|.eo-grid|#excerpt|#postexcerpt|#postbox-container-2|#normal-sortables"
iframe_content_styles="background-color:white|width:200px|width:300px|width:300px;height:400px|width:300px|width:535px|width:535px|width:300px|display:inline-block|height:314px|height:325px|height:305px|height:305px"
show_part_of_iframe_new_window="_top" show_part_of_iframe_new_url="http://ipaddress/company/wp/" hide_page_until_loaded="true" show_iframe_loader="true"]


Just to be clear ... the loading icon (advanced_iframe loadin icon, I mean. Not other preloader plug-in) is shown only when the parent page is open. Not also when user confirm the registration of the post. After user send the post, worpress show for only few second some parts I had hidded inside the iframe. After, the page (parent or child, I don't know) finish to load and the parts I had hidden correctly disappear. In this short period of time, user can click in some parts I wanted to hide. Moreover is unaesthetic.

Quote:
Maybe using the external workaround although you are on the same domain works for you! Because then you could e.g. include css dynamically which does hide the areas you don't like before the content is shown.

I believe I will not be able to develop this.

Thanks
Alessandro.


Top
 Profile  
 
PostPosted: 19. Mar 2018, 10:37 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
The css solution I wrote is not much different to you existing one! You only have to define the settings in the administration and not in the shortcode. And then set "Write css directly" for the external workaround.

Please see the instruction there!

The only "hard" part is to include the ai_external.js. I have already an option for this for the site. But not for the administration yet.

Best, Michael


Top
 Profile  
 
PostPosted: 19. Mar 2018, 23:01 
Offline

Joined: 3. Mar 2018, 21:35
Posts: 11
Hi Michael,

Quote:
The css solution I wrote is not much different to you existing one!
I did not fully understand what you mean

Quote:
You only have to define the settings in the administration and not in the shortcode. And then set "Write css directly" for the external workaround. Please see the instruction there!
Ok, I think I understand how it works

Quote:
The only "hard" part is to include the ai_external.js.
How should I include a script on an administration page? The page I show in the iframe is this http: //ipaddress/company/wp/wp-admin/post-new.php. But I do not know how to include the ai_external.js file. And how to do it in the right place. I can not find a html page called post-new.

Quote:
I have already an option for this for the site. But not for the administration yet.




I really appreciate your help

Best regards

Alessandro


Top
 Profile  
 
PostPosted: 19. Mar 2018, 23:24 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
Please send me an e-mail. I will send you a version where you can add the ai_external to the administration.

Best, Michael


Top
 Profile  
 
PostPosted: 19. Mar 2018, 23:36 
Offline

Joined: 3. Mar 2018, 21:35
Posts: 11
Hi Michael,

I sent you a private message with mi e-mail

Thank you so much for your help.

Alessandro


Top
 Profile  
 
PostPosted: 25. Mar 2018, 17:14 
Offline

Joined: 3. Mar 2018, 21:35
Posts: 11
Hi Michael,

I really appreciate the time you dedicate to me.
but at the moment I am not able to use the External workaround because I am not able to find the correct position for the script in the file of the admin page.
I'm sorry.
In any case, my site works well.

Thanks

Alessandro


Top
 Profile  
 
PostPosted: 25. Mar 2018, 23:59 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
o.k. if you need any more help please let me know.

Best, Michael


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

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 3 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:
powered by phpbb | Datenschutz/ Privacy policy