close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

How to use php current page title in dynamic site

Thread began 3/02/2011 12:57 pm by anonymous | Last modified 3/08/2011 9:33 am by Jason Byrnes | 5305 views | 9 replies |

anonymous

How to use php current page title in dynamic site

Is there a way to add the like and share buttons to the header of a dynamic site and have the extension use the current page as the url? For example, I have a header include that I install the extension on and I want the like button to use the url of the current page, even if it contains url parameters.

That would make this really handy for custom cms projects as well as larger dynamic sites.

Thanks for any help,

Tony

Sign in to reply to this post

Jason ByrnesWebAssist

sure when adding the like or share buttons, set the URL to:

php:
http://<?php echo((isset($_SERVER["PHP_SELF"]))?$_SERVER["PHP_SELF"]:""?><?php echo((isset($_SERVER["QUERY_STRING"]))?$_SERVER["QUERY_STRING"]:""?>
Sign in to reply to this post

anonymous

Great!

Hi Jason,

And thanks for the quick response! Should have thought of that one myself!

Thanks again,

Tony

Sign in to reply to this post

anonymous

Getting an error message

Hi Jason,

The URL trick worked for getting the wall post and like reference, but now I'm getting an error message:


The page at conferences.php could not be reached.

Conferences.php is the page with the like button on it. Not sure why it's trying to connect to facebook like this, but it's clearly generated by either the extension or facebook.

Any idea what this might mean?

Thanks,

Tony

Sign in to reply to this post

Jason ByrnesWebAssist

can you send a link to that page please.

Sign in to reply to this post

anonymous

Page link

Ok, here's a link to a page (test page) with the FB like button on it. You can see the error after clicking the like button.

conferences-test.php

Thanks,

Tony

Sign in to reply to this post

anonymous

Wall Post Works

Hi Jason,

Thought I'd mention that the like functionality does work. It creates the post on your wall, but you can't unlike it afterward and once you've liked it the error shows.

Hope that helps and thanks for looking into this.

Tony

Sign in to reply to this post

Jason ByrnesWebAssist

I see, the like link is missing the domain.

In the like behavior, set the URL TO:

http://www.tg2artists.com<?php echo((isset($_SERVER["PHP_SELF"]))?$_SERVER["PHP_SELF"]:"") ?><?php echo((isset($_SERVER["QUERY_STRING"]))?$_SERVER["QUERY_STRING"]:"") ?>
Sign in to reply to this post

anonymous

Works!

Hi Jason,

Works like a charm.

Thanks,

Tony

Sign in to reply to this post

Jason ByrnesWebAssist

great, glad to hear it is working.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...