I need to create a contact form in a Facebook tab, that is supposed to store every entry/submission in a MySQL database. But i'm quite stuck.
Doing the HTML part, creating the form and the inputs wasn't that hard, but the main problem comes from the iFrame/HTML applications from Facebook (i used some already - popular - made apps that i found around).
I cannot include PHP into the Facebook tab, because it's only has support for html/css/js. I tried using but failed, as they are not displaying their source inside the Facebook tabs, so how am i supposed to accomplish this task?
LE: I managed to self-sign a certificate. Now the application is starting, as i provided secured URLs, but instead of loading the index.php in that directory i pointed, it gives me a 404 of the main site.
The main site is quart.ro, the url/secured urls are: http://quart.ro/beautydistrict and https://quart.ro/beautydistrict.
Should i write an .htaccess only for that folder? Or should i change the urls to point directly to the file ex: http/s://quart.ro/beautydistrict/index.php/?
LE2: On the application's page - https://apps.facebook.com/beautydistrict/ - it displays the content correctly (this content - http://quart.ro/beautydistrict). This app is a page tab. If i install the app to a facebook page, then instead of displaying the content correctly it gives the 404 of the main website (intead of http://quart.ro/beautydistrict i get http://www.quart.ro/404).
You can post your html data into external PHP file using jquery and ajax. Use this guide http://api.jquery.com/jQuery.post/
Related
I am converting a Wordpress website to Magento. One aspect of this switch is achieving a Video Intro into the website. Currently it utilizes a Wordpress plugin which loads a website http://example.com/video-intro before http://example.com and after the video is finished playing the window is redirected to http://example.com.
I have purchased the pure PHP version of this plugin (documentation here: http://plugins.themestrike.com/videointro2/documentation-php/), but it does not seem to work with Magento. I cannot figure out why. The page http://example.com/video-intro works great, the redirect works great, but I cannot get http://example.com/video-intro to come up before anything else. *The plugin creator has responded as unable to provide any support for the script.
Off the top of my head, you could do 2 things:
use a php header function to redirect the home page to the page you wish - more info: http://php.net/manual/en/function.header.php
Alter your .htaccess file to always re-direct users to the video link.
However it is worth considering what do you do when considering repeat users who have already seen the video.
Due to some programming errors, I got thousands of popup url created dynamically, now I want to remove permanently without disturbing running functionalists on website www.wedddingplz.com.
For example - http://www.weddingplz.com/delhi-ncr/Beauty-Parlours/Aaina-Hair-Colour-Salon-Janakpuri is popup url on button Send Enquiry of page http://www.weddingplz.com/delhi-ncr/Beauty-Parlours/Aaina-Hair-Colour-Salon-Janakpuri
This website is created in PHP Zend, provide easiest method to clean these urls.
Few more examples are -
weddingplz.com/detail/quickquotepopup/id/9359/zone_id/7
weddingplz.com/detail/quickquotepopup/id/9361/zone_id/9
weddingplz.com/detail/quickquotepopup/id/9364/zone_id/7
weddingplz.com/search/contactform/vendorid/10013/category/Travel+Agents/category_id/32/name/Jyoti+Travels+Pvt.+Ltd./zone_id/7
weddingplz.com/search/contactform/vendorid/10014/category/Travel+Agents/category_id/32/name/K+R+Sankaran+Tours/zone_id/1
weddingplz.com/search/contactform/vendorid/10016/category/Travel+Agents/category_id/32/name/K+L+Tours+and+Travels/zone_id/7
weddingplz.com/search/morebranches/vendorid/3396/catName/Confectionary-and-Chocolates
weddingplz.com/search/morebranches/vendorid/3441/catName/Confectionary-and-Chocolates
weddingplz.com/search/morebranches/vendorid/3445/catName/Confectionary-and-Chocolates
weddingplz.com/search/morebranches/vendorid/8910/catName/Spa
weddingplz.com/search/morebranches/vendorid/8921/catName/Spa
weddingplz.com/search/morebranches/vendorid/8924/catName/Spa
etc...
Thanks
Let me know if this question needs more clarification.
I am a front-end developer, and I usually use Wordpress with lots of custom fields to put together a CMS for clients.
A current client wants a design portfolio site that initially presents a grid of images that link to projects, but instead of loading a new page on click, the new content loads and fades in smoothly.
I figure the simplest way to do this kind of thing is to load everything up front on one page with ajax (a loading screen is OK), and then just show/hide/move content with jQuery.
The request I am having trouble with is being able to have specific URL's for different projects and images. The client wants a URL scheme like here:
http://collins1.com/work/bp-helios-house/3
Where the number at the end causes a specific image to load in the given project. It seems like this would be simple enough using php variables where like:
http://www.whatever.com?project=3&image=2
And using those to manipulate the initial AJAX load.
But how is this accomplished using a more traditional (pretty) URL structure like the example? If I am building the site as one page loading content, won't the browser attempt to load that as a page and just come up with a 404?
Bonus: How do you change the URL in the address bar to create these links as the user navigates the site without reloading the page?
Thanks!
what you see there, is called url routing. Basically, some server rule that rewrites the url in a proper way, depending on server and scripting language used.
for example, the url
http://server.com/foo/bar
MAY be redirected to
http://server.com/index.php?foo=bar
If you need a lightweight framework to handle this, take a look at www.slimframework.com
If you want real pretty urls you are going to need a server-side framework for url routing and will require you to get into php or ruby on rails. If you want a pure front end solution you can fake it in javascript using hash fragments. For how to do this see
http://backbonejs.org/#Router
http://www.asual.com/jquery/address/
http://benalman.com/projects/jquery-hashchange-plugin/
I want to be able to log into a site (form POST) from my site and then display the logged in site on my site.
Will logging into the site with cURL (form POST) and on success display the site as if I was logged in on my site using the embed tag work? Is this the right way to do what I want?
Examples would be helpful.
That can work if you add <base> tag pointing to the website you are displaying to load all css and js files with relative paths.
Also, if you store cookies in file or database, you might not even need to login every time.
I've tried a bunch of techniques to crawl this url (see below), and for some reason the title comes back incorrect. If I look at the source of the page with firebug I can see the correct title tag, however, if I view the page source it's different.
Using several php techniques I get the same result. Digg is able to crawl the page and parse the correct title.
Here's the link: http://lifehacker.com/#!5772420/how-to-make-ios-more-like-android
The correct title is "How to Make Your iPhone (or Other iOS Device) More Like Android"
The parsed title is "Lifehacker, tips and downloads for getting things done"
Is this normal? How are they doing this? Is there a way to get the correct title?
That's because when you request it using PHP (without any JS support) you're getting the main page of lifehacker - which is lifehacker.com.
Lifehacker switched their CMS recently so that all requests go to an initial page and then everything after the hashbang is read by a JS script in the main page to figure out which page needs to be served. You need to modify your program to take this into account
EDIT
Have a gander at these links
http://code.google.com/web/ajaxcrawling/docs/getting-started.html
http://www.tbray.org/ongoing/When/201x/2011/02/09/Hash-Blecch
Found the answer:
http://lifehacker.com/#!5772420/how-to-make-ios-more-like-android
becomes:
http://lifehacker.com/?_escaped_fragment_=5772420/how-to-make-ios-more-like-android