Coolbandit
Forum Replies Created
-
K. thank you. Solved.
I will tell you how I solved this. Look for this line in qmn_quiz.php
<a class=\"mlw_qmn_quiz_link\" onclick=\"mlw_qmn_share('Facebook', '".esc_js($qmn_social_media_text["Facebook"])."', '".esc_js($qmn_quiz_options->quiz_name)."');\">Facebook</a>Then change it to
<a class=\"mlw_qmn_facebook_link\" onclick=\"mlw_qmn_share('facebook', '".esc_js($qmn_social_media_text["facebook"])."', '".esc_js($qmn_quiz_options->quiz_name)."', '$facebook_app_id');\"><img src='http://website.com/images/Share-on-Facebook.png' alt='Facebook' /></a><br>The
at the end just makes sure the twitter button is on it’s own line.
And then under custom style add the class.mlw_qmn_facebook_link img:hover { cursor: pointer; opacity:0.7; filter:alpha(opacity=70); /* For IE8 and earlier */ cursor: pointer; }You can modify it in the code. wp-content/plugins/quiz-master-next/includes/js/qmn_social_share.js look for the line that says
+ "redirect_uri=http://www.mylocalwebstop.com/mlw_qmn_close.html"and change it to your address. This shouldn’t happen if you use the default app id. When you use your own the only other way to do it I think is to specify under your app settings the address http://www.mylocalwebstop.com/mlw_qmn_close.html. I don’t know if you can have more than one address per app or not. I read from someone on here that they let it redirect to a page on their ownsite called popclose.html and then add this code to automatically close the popup.
<script>window.close();</script>I have only tested it on my firefox Browser so far but seems to be working.
:NOTE: The problem with modifying the code is you have to do it every time you update the quiz.
I just realised this only works for me cause I added some code to my template header. This way when people share it and someone clicks it it redirects them to the top of the quiz. You would have to add he results page to a category called Share Redirect.
<?php /////////////////////////////////////////////////////// $ref = $_SERVER['HTTP_REFERER']; $host = $_SERVER['HTTP_HOST']; $parent = $post->post_parent; $parent_url = get_permalink($parent); ?> <script> var parent_url = <?php echo json_encode($parent_url); ?>; </script> <?php if ( in_category('Share Redirect') ) { $donkey = $_GET["areacode"]; if ($donkey == '90210') { echo "<script type='text/javascript'> window.location.replace(parent_url); document.location = parent_url; location = parent_url; </script> <meta http-equiv='Refresh' content='0; url=".$parent_url."'>"; } if(strpos($ref,$host)===0 || strpos($ref,$host)<=15) { // yes, three '=' // echo $parent_url.'<br/>You came from AFM'; } else { echo "<script type='text/javascript'> window.location.replace(parent_url); document.location = parent_url; location = parent_url; </script> <meta http-equiv='Refresh' content='0; url=".$parent_url."'>"; // echo $parent_url.'<br/>You came from AFM'; } }Now when you share the link you add ?areacode=90210 to the end and it when they come from that link it will redirect them.
The if(strpos($ref,$host)===0 || strpos($ref,$host)<=15) “<=15” is just saying if you came from anywhere that doesnt have my site address in the first 15 possitions. http://www.acrossfrommarty.com That number could be smaller but at 15 that seems to work. It was working by itself but some people on their phones were not being redirected correctly so I changed it to the area code thing. I left the if(strpos($ref,$host)===0 || strpos($ref,$host)<=15) part in as well because it will still redirect most people who just share the url and don’t click the share button. Or get there from someone sharing the link in a forum or from a google searchI realize this code is messy and ugly and probably no help to beginners but will help someone who understands some javascript and php.
Forum: Plugins
In reply to: [Simple Share Buttons Adder] Facebook not showing the right imageI had that issue when I had the jetpack plugin activated on my site. Jetpack somewhere creates its own OG tags. I just deactivated it because I didn’t use it. If you are using it maybe you can just deactivate that part of the plugin. This could possibly be your problem. If not maybe the problem is originating with a different plugin.
I will tell you how I solved it Ganessa. put this in the results text and it will redirect them to another page.
<meta http-equiv="Refresh" content="0; url=http://webpage/">It is an ugly fix but it seems to be working. Then just ad your own sharebutton. here is an example of mine. Replace My url with yours.
<a href="http://www.facebook.com/share.php?u=http://acrossfrommarty.com/Viral/fun-quizzes/what-family-guy-character-are-you/peter-griffin/"> <img src="http://Acrossfrommarty.com/acrossfrommarty/images/icon/Social/Share-on-Facebook.png" alt="Facebook" /></a>here is an example on my quiz
Use facebook debugger to check your share image and Excerpt. Click it a few times to see it all. If you want to update the image, rename it or facebook will keep using the old one for a long time without updating the cache.I will tell you how I solved it Ganessa. put this in the results text and it will redirect them to another page.
<meta http-equiv="Refresh" content="0; url=http://webpage/">It is an ugly fix but it seems to be working. Then just ad your own sharebutton. here is an example of mine. Replace My url with yours.
<a href="http://www.facebook.com/share.php?u=http://acrossfrommarty.com/Viral/fun-quizzes/what-family-guy-character-are-you/peter-griffin/"> <img src="http://Acrossfrommarty.com/acrossfrommarty/images/icon/Social/Share-on-Facebook.png" alt="Facebook" /></a>here is an example on my quiz
Use facebook debugger to check your share image and Excerpt. Click it a few times to see it all. If you want to update the image, rename it or facebook will keep using the old one for a long time without updating the cache.Forum: Plugins
In reply to: [Simple Share Buttons Adder] Facebook not showing the right imagealso it my code in post 17 of this page, it looks like there is a space where there shouldn’t be one. Sorry about that but I don’t think it matters but :
if ( has_post_thumbnail())should be
if (has_post_thumbnail())
`Forum: Plugins
In reply to: [Simple Share Buttons Adder] Facebook not showing the right imageBlackwolfman I may have a solution to your problem. you can upload two images and add a css class for the bigger image that you don’t want to be visible and facebook scraperwill still see it.
.fb_image
{
visibility:hidden;
display:none;
}
I tested this and facebook found the image after i scraped the page twice. you could probably get away with just using display:none; and not visibility:hidden; It is not the best solution but it is a solution. I am not sure if the image is still being downloaded through the broswer of the page when this is set or not but either way one extra image shouldn’t be to bad.Another untested not as good of an idea I had would be to use a .png image with transparency to make up the difference in size you need. This is not really a good idea, just brainstorming.
One last thing.. couldn’t you just use the bigger 200x200px image and resize it for the page using the mage width and height attribute?
<img src='http://Acrossfrommarty.com/acrossfrommarty/images/Nintendo/nintendo.png' width='400px' height='280'>You can edit the height and width attributes to anything you like. Ideally you want them to be similar to the original image size. Bigger could look distorted and smaller is wasting banwidth. In your case it would not be wasting. Those are my ideas.
Forum: Plugins
In reply to: [Simple Share Buttons Adder] Facebook not showing the right imageblackwolfman, what is the problem exactly? Does it share the wrong image? No image? If you put the url in the scraper here Do you get any errors? what is showing up under the OG image? I am no expert but I did manage to get it working for my site so maybe I can help.
Forum: Plugins
In reply to: [Simple Share Buttons Adder] Facebook not showing the right imageIf you don’t want to use that plug-in above like me you can just edit your themes header.php file below the <header>..
<?php if ( has_post_thumbnail()) { $fb_image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full'); } ?> <meta property="og:image" content="<?php echo $fb_image[0];?>" />scanning your url here tells facebook to update the catch!
actually use this
if ( has_post_thumbnail()) { $fb_image = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'full');instead of
<?php if (function_exists('wp_get_attachment_thumb_url')) { $fb_image = wp_get_attachment_thumb_url(get_post_thumbnail_id($post->ID)); }?>Or it will look square and ugly (tiny)
And when you echo it add this[0] because it is an array
<script> var fbimage = <?php echo json_encode($fb_image[0]); ?>; </script>Ok buddy I figured out a work around that I will share with you so maybe it can help someone else. I added
+ "&" + "picture=" + fbimage;to your qmn_social_share.js file. I added this
<?php if (function_exists('wp_get_attachment_thumb_url')) { $fb_image = wp_get_attachment_thumb_url(get_post_thumbnail_id($post->ID)); }?>to the <head> of my themes header.php file and
<script> var fbimage = <?php echo json_encode($fb_image); ?>; </script>to the body. Thank you very much I really appreciate your plugin.
Ok. Once I cleared both fields, and saved template it works now.. so far. thanx! BUT I still cant get the image to display when shared. It worked at first until I changed the image. It works fine when you share my page, just not when I share it from the quiz form.
Hey thanks! this way did work. <img src=’WEBSITE.jpg’ title=’Videos’ alt=’AFM Videos’ border=’0′ />
First I was trying it the following way
[mk_image src=”website.jpg” image_width=”” image_height=”” crop=”true” lightbox=”” frame_style=”” target=”” caption_location=”” align=”left” margin_bottom=”10″]You have made me smile. Thank you!