Results of a PHP script not shown on the Wordpress page - php

OK, so I have this fully working PHP script, available HERE and the results should be shown in an iframe HERE under section "Best Results". But they are not.
However they are shown if I am viewing the page signed in as admin, but I frame is invisible to normal visitors. Why is that so? How can I solve that?
EDIT:
I am using Elementor to set up the page and Custom HTML widget element with the following code:
<iframe src="/zan/fai_pilot.php?p=4385" frameborder="0" width="100%" scrolling="yes" height="440">
</iframe>

When I load your outer page, i don't see an iframe tag in the Best Results section. So that leads me to believe if you're seeing it when logged in as admin, there is something in your Elementor config regarding roles/permissions you need to change.

The answer: Don't use "Custom HTML" element from the Elementor, use "Text Editor" element instead.

Related

Is there a way to remove like count in Facebook Like Box widget?

I know that tampering with their widget isn't allowed but how do sites like these hide their like counts and it doesn't seem like the widget has been edited. Is there a proper way to do this?
http://www.marketing-interactive.com/
http://www.humanresourcesonline.net/
<iframe src="http://www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2F%23%21%2Fpages%2FMarketing-Magazine%2F174907875860500&width=314&colorscheme=light&show_faces=true&stream=true&header=true&height=427" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:314px; height:427px;" allowtransparency="true"></iframe>
They're adding a height=427 parameter to the IFRAME URL, which results in the "faces" area at the bottom, and its accompanying fan count, being hidden from view. They're keeping show_faces=true because otherwise the Like count will be written next to the Like button.
There's a slightly weird double-line at the bottom as a result of this approach, but while earlier I wrote it was undocumented, the doc actually references the height param (it's just not in the plugin generator form), so it appears this is supported.
To make Like Boxes I still just goto Facebook's "generator" here: http://developers.facebook.com/docs/reference/plugins/like-box/.
When your putting in settings you uncheck "Show Faces".
This changes the resulting code they give you to: show_faces=false.
It's because they're using a Like Box, not a Like Button.
These are two different things, and the individual like buttons in a Like Box don't have the counts when "show faces" is enabled (though the counts are instead displayed elsewhere in the box).
Note: This answer is assuming you mean the Share Button, and not Like Box
They used a Facebook provided CSS to make the elements have a CSS property of display: none;.
On the span elements with the classes:
fb_share_count_nub_right
fb_share_count
Add the class fb_share_no_count on both of them.

javascript error being indexed

I have a webpage. On it there is a javascript warning to the users who have javascript disabled. This is in the body part of the html page, towards the top. In google this is what shows in the description!
How can I make this go to the bottom of the page to stop google using it as the descriptiuon?
It is in a class if that helps...
If you move the warning to the bottom of the code you can use absolute positioning (or fixed if you want it to scroll with the page) to have it display at the top of the page. This way it is not the first text that Google sees when it indexes the page. Along with that I would add in the meta description tag as Christopher McCann said.
Have you set a meta description tag? Do you have other content on the page?
You can't MAKE google choose what it displays as the description but it will usually use the meta description tag so make sure you have one set. It won't fix straight away - you will need to wait until Google re-crawls your website.

include a website in php file

Hi i am trying to include a webpage link from another website into my website.
how can i do this?
i tried
<?php web_include ('http://website.com/website.html') ; ?>
but all the commands are not loading after this statement. I want to include another webpage into my homepage directly. my homepage is completely designed in php, but the other one is html or php.
i also tried <?php include("http://www.othersite.com/filename.html"); ?> but this html is not at all loading.
Possible Solution:
ok this is what i am using
<iframe name="FRAMENAME" src="http://website.com/dropdown.html" width="1000" style="z-index:10000" height="40" frameborder="0" scrolling="no" allowautotransparency=true></iframe>
I am just including a dropdown menu for my index page. The CMS of the my site is restricting me from viewing the dorpdown in IE. When i view the dropdown.html page, i can see the dropdown, so I am trying to use iframe. Now using the iframe i can see the dropdown in IE as well, but the dropdown is not showing on the top. It is showing behind the other images on the site. How do i get it on top of the other images. z-index is not working for this.
This code requires allow_url_include=On in your php.ini, which is disabled by default because it's REMOTE CODE EXECUTION, one of the worst you can have in PHP. This is called the Remote File Include (RFI) vulnerability. If there is PHP code on this site it will be executed on your server.
Extremely insecure:
<?php include("http://www.othersite.com/filename.html"); ?>
What you probably want is:
<?php print file_get_contents("http://www.othersite.com/filename.html"); ?>
However, this is technically an XSS vulnerability. So, if you trust the website there isn't a problem. But you probably want to run Html Purifer before printing it out.
Just a basic recommendation, but it sounds like you're trying to debug complex functionality within a complex environment, which will only make it harder.
Debugging is easier if you break it down into component steps. In this case, I recommend:
Display the iframe on a blank html page.
Make sure everything works in that simple case.
Display on the more complex page.
If it's still not working, comment out the javascript on the complex page to determine if that is causing the adverse interaction with the iframe page's javascript.
Going through the debuggging stepwise like that should simplify the process.

Creating "Like" buttons for arbitrary elements on my site, and reading back the status - possible?

I'm a total newbie to Facebook programming and would like to know, as a follow-up to this question, whether the following is possible.
I have a collection of events on a web site. I'm fetching them from several RSS feeds, and have total freedom in how to output them - e.g. as single pages, so there is a permalink for every event.
I would like to
Create a Facebook "like" button for each of the events without entering them into the Facebook system in any way
Read back the "like" status of the current user for any one of those events via JavaScript or on server side so I can display these events in a "events I like" list. The important thing is that I need to be able to read the status later = on subsequent page requests, not only in the moment the user clicks the "like" button.
#karim79's answer does answer the first part, but not the second yet.
this page contains all the information I need to create the button: Social plugins > Like button there also is an FBML event to react to when somebody signs up. But that still doesn't enable me to check the "like" status of a returning user.
Is there any way to do that?
A brain-dead way of automatically generating 'like' links for your site (which I recently implemented - so I know works) would be to simply generate the 'href' parameter which (facebook's) like.php reads from the iframe source. Just build the iframe code using their widget thingie and use PHP to dynamificate the href parameter:
<iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode($url); ?>%2F&layout=button_count&show_faces=false&width=50&action=like&colorscheme=light&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:75px; height:21px;" allowTransparency="true"></iframe>
You can customise it to a limited extent, just see the attributes list right under the button creation widget.
Using fbml (which I was too lazy to incorporate, and somewhat reluctant due to the fact that I would have had to include yet-another-library):
<fb:like width="200" show_faces="no" href="<?php echo $url; ?>"></fb:like>
There's a neat list of examples here: http://fbrell.com/xfbml/fb:like

Auto scroll down iframe

How can I get an iframe such that when it loads up, it loads up with the page inside scrolled down by a fixed amount (say 100px)?
I have so far:
<iframe src="http://news.bbc.co.uk/1/hi/uk/7459669.stm" scrolling="no" width=500px height=500px></iframe>
but it loads up with the bbc.co.uk page inside at the top left when I actually want it to load up scrolled part way down (that is the page inside the iframe scrolled down, not the page containing the iframe).
Anyone know how to do this?
Its not exactly what you are looking for but you could set the URL to load scrolled to a particular element if you know that an element with that ID will always be on the page.
Something like this:
http://news.bbc.co.uk/2/hi/uk_news/7459669.stm#mediaAsset
HTH
You can not do this. Browser security restrictions will prevent you from accessing the "inside" of that frame completely. If the frame src was from the same domain as the containing page, then you could add an onload handler that set myiframe.contentDocument.body.scrollTop = 100;.
Genrally I Do Specify marginheight attribute on iframe for this
<iframe src='url' marginheight='100px'>
You can also use marginwidth attribute to move inner page left side
for more information checkout this link
http://www.w3schools.com/tags/tag_iframe.asp
I hope Thats Help

Categories