Facebook Like button doesnt show - facebook-like

Im developing a RPG page and our Like Button has dissapeared.
I used the generator to create the code, and tried the diffrent versions there off non of them works.
I also used the LINTER and it shows no errors.
I asked my provider and they can find no error.
The page is http://www.wodgotham.com/ and next to the Facebook homepage link above the twitter link the Like button should be.
I have looked through the code and stared myself blind... I dont know what to do
Suggestions and assistance would be highly appriciated

You're not using the code from the generator - you're trying to load
http://connect.facebook.net/us_US/all.js - us_US is not a valid locale
The Javascript console on my browser shows the error as a 500 error from that URL, which when clicked says /* Not a valid locale. */

I believe Igy is correct. "en_US" would be the valid locale.

Related

How to link to html page at specific ID bookmark?

Using Diagrams.net (draw.io), I would like to link specific elements to web pages. This is easily accomplished currently by creating a link for the element (say a rectangle).
However, I would like to navigate directly to a specific id bookmark in the HTML page. I cannot seem to get that to work.
For example, if I try to use this syntax (which works in the browser location bar):
https://en.wikipedia.org/wiki/Canada#Geography
I will be taken to the main page:
https://en.wikipedia.org/wiki/Canada
However, the goal is to go to the "Geography" section of this page.
I have also tried the json syntax without any success:
data:action/json,{"actions":[{"open":"https://en.wikipedia.org/wiki/Canada#Geography"}]}
I have also played with different action syntax such as:
data:action/json,{"actions":[{"open":"https://en.wikipedia.org/wiki/Canada"},{"scroll":{"tags":["Geography"]}}]}
Note: I'm using the diagrams.net desktop version 14.1.8.
Thank you for taking the time to read this question.
Paul
On Windows this only seems to work if the browser isn't already open. There is not much we can do to fix this as we're passing the link to the OS.

POST http://exaple.com/index.php?route=checkout/cart/add 500 (Internal Server Error)

I am new to opencart. Some how I managed to create a website after reading online tutorial.
The website was worked well, but since two day the add to cart button is not working. Its showing some error on console. I tried different browser but same result.
Here I attached the screenshot.
The website is posakaworld.com
Any tips or hint is appreciated :)
I also having the similar issue, please check your
system/log/error.txt
For my case, I installed a new extension, and it shows and error
2017-06-25 9:49:03 - PHP Notice: Undefined variable: checkCart in /Users/Shiro/Sites/opencart/vqmod/vqcache/vq2-catalog_controller_checkout_cart.php on line 724
When I check ajax response, it does not show the error, it is due to production display error off, so finally, I manage to find out it is just a PHP Notice can break the system.
Once I fix the undefined variable notice, my ajax no more error. Everything back to normal. I hope this solution is helped.

content empty when using scrapy

Thanks for everyone in advance.
I encountered a problem when using Scrapy on Python 2.7.
The webpage I tried to crawl is a discussion board for Chinese stock market.
When I tried to get the first number "42177" just under the banner of this page (the number you see on that webpage may not be the number you see in the picture shown here, because it represents the number of times this article has been read and is updated realtime...), I always get an empty content. I am aware that this might be the dynamic content issue, but yet don't have a clue how to crawl it properly.
The code I used is:
item["read"] = info.xpath("div[#id='zwmbti']/div[#id='zwmbtilr']/span[#class='tc1']/text()").extract()
I think the xpath is set correctly and I have checked the return value of this response and it indeed told me that there is nothing under this directory. Results shown here:'read': [u'<div id="zwmbtilr"></div>']
If it has something, there should be something between <div id="zwmbtilr"> and </div>.
Really appreciated if you guys share any thoughts on this!
I just opened your link in Firefox with NoScript enabled. There nothing inside the <div #id='zwmbtilr'></div>. If I enable the javascripts, I can see the content you want. So, as you already new, it is a dynamic content issue.
Your first option is try to identify the request generated by javascript. If you can do that, you can send the same request from scrapy. If you can't do it, the next option is usually to use some package with javascript/browser emulation or someting like that. Something like ScrapyJS or Scrapy + Selenium.

CFCLIENT: Doc examples do not work; Can't get anything to work?

So I realize that the new CF11 mobile features have been received with some very mixed reviews, but I wanted to try them out to see if I could use them for some really simple device detection, however I cannot get anything to actually work.
For example, I am looking at the doc for cfclientsettings, specifically at the first example on the page under the "Device detection" heading. Here's the code for reference (I formatted it a little to ensure it's easy to read here):
<cfClientSettings detectDevice=true />
<cfclient>
<cffunction access="public" name="showCanvasSupport" returntype="void">
<cfset evalStr = "document.getElementById('canvas').innerHTML='" & cfclient.canvas & "'">
</cffunction>
</cfclient>
Canvas support -<b id="canvas"></b><br>
<button onclick="invokeCFClientFunction('showCanvasSupport',null)">Show canvas support</button>
Creating a new .cfm page and adding this code produces the text and button on the page, but clicking the button throws a JS error in Chrome: "Uncaught The function signature is invokeCFClientFunction(functionName [, arg1, arg2, arg3, ...], successCallback, failureCallback). The functionName, successCallback and failureCallback are mandatory. If you don't have a successCallback or failureCallback, null can be passed as the value."
Ok, not great. So I checked some more docs and decided to add another null argument to the invokeCFClientFunction() call to fix the missing callback. This at least corrects the JS error, but now nothing at all happens when clicking the button.
So after some more fussing, I arrived at the following code, which still does not work, but seems closer:
<cfClientSettings detectDevice=true />
<cfclient>
<cffunction access="public" name="showCanvasSupport" returntype="void">
<cfscript>
document.getElementById('canvas').innerHTML=cfclient.canvas;
</cfscript>
</cffunction>
</cfclient>
Canvas support -<b id="canvas"></b><br>
<button onclick="invokeCFClientFunction('showCanvasSupport',null,null)">Show canvas support</button>
So this code, when you click the button, sets the innerHTML of the canvas element to "undefined". Awesome.
Honestly, I've been trying every example I can find for using cfclient and NONE of them work. Is there some secret I'm missing? I have a sneaking suspicion that if I'm not creating a 'Mobile Project' in CFBuilder that this stuff doesn't work? If so that's stupid and they don't state that in the docs really.
What I'm trying to do, in the end, is simply use cfclient for some basic device detection and to grab the width of the browser/device to do some basic media query style detection very much like in the "Using media queries" section of the cfclientsettings doc. I just want to grab the width and then set a session variable based on it.
I am running a fully patched developer version of CF11 on my Win7 machine setup with IIS. Any and all support is welcome.
Cross post on Adobe Forums: https://forums.adobe.com/thread/1929387
After bashing my head on my keyboard for a while more, I've gotten the cfclient scope working.
I finally found this page in the docs: Device Detection
At first glance, this page seems almost identical to the cfclientsettings doc page, even having the same code examples.
However, where the cfclientsettings doc uses the scope like this:
cfclient.canvas
The Device Detection doc page writes it like this:
cfclient.properties.canvas
Boom. That's of course all it took. What a waste of time. All the cfclient scoped variables work just fine if you add ".properties" in there.
I'm still not sure if the cfclientsettings doc is just plain wrong, or if it's referencing it in a different context. I'll definitely add a comment to it on that point.
(Also, the JavaScript still fails for this example on both doc versions, so there's that.)
Hope this helps somebody who wants to do simple ColdFusion client device detection.
Let me preface this answer by stating that I have never used cfclient and I am only relaying the documentation that I found online for it's use. This was too long for a comment.
You stated:
I have a sneaking suspicion that if I'm not creating a 'Mobile Project' in CFBuilder that this stuff doesn't work? If so that's stupid and they don't state that in the docs really.
I think they do state that in the documentation actually. Here is what I found. At the beginning of the Client-side CFML (for mobile development) document it states:
Before you begin – To try out the examples provided in this document, you need to set up the ColdFusion mobile development environment. See Configuring the development environment.
I am not going to repeat all of the information here as it is fairly substantial but the Configuring the development environment page mentions that you must install ColdFusion Server 11, install ColdFusion Builder and then create a 'ColdFusion Mobile Project' within Builder to help you along.
However that page also states that you can convert an existing ColdFusion project automatically by following the steps under Migrating existing projects where you 'Apply CF Mobile Nature' to the project from within ColdFusion Builder. This may be the piece that you are missing.
I think if you read through the documents that I referenced it may get you going. Also here is a link to their Building Mobile Applications documentation which contains an overview of the entire process.

How set a website as homepage in IE, Firefox, Chrome and Safari with C++?

Is there a way to set a website like google.com as homepage through C++ or C ? How ?
Not sure what your motive is, but I don't think of this as something I want any code on my system to be setting out from under me. It sounds like the kind of thing adware/malware would do to your grandparents (who wouldn't know how to fix it once it's set). Note the negative comments when the question was asked of how to do it from JavaScript:
How can I set default homepage in FF and Chrome via javascript?
It's better to point people at instructions for doing it themselves. Remind with a banner which says "Make us your homepage!", and link to something along these lines:
http://www.makeuseof.com/tag/how-to-change-your-homepage-in-5-browsers/
If not for the aesthetic reasons, there are technical reasons not to try and write code for it. Each browser stores this information in its own place. In IE's case, there appears to be a registry setting:
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\Start Page
So you'd use calls to the Windows Registry API to query it and set it. But Firefox doesn't save this in the registry, it saves it in something called prefs.js and you'll be looking for:
user_pref("browser.startup.homepage", .... );
Then there's Opera, Safari, Chrome, etc. All told, better to just give people directions and put them in control of their experience!
Imports Microsft.Win32
...
Module Util
Sub SetHomePage(Dim theUrl As String)
Registry.SetValue("HKCU\Software\Microsoft\Internet Explorer\Main", "Start Page", theUrl)
End Sub
End Module
Yes.
Find the way each browser saves its configuration to disk and edit that (*). It may be a file, or records in a database, or some data in a central registry, or some other scheme --- the browser documentation should tell you.
To open/read/write/save/close a file, the C functions declared in the header <stdio.h> may be helpful.
(*) for Firefox it's a file named "prefs.ini" in a directory somewhere under the users home path; there may be more than 1 such file if the user has more than 1 profile.