close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Social Media Toolkit - Dynamic page option

Thread began 5/29/2011 5:24 am by Daryl | Last modified 5/29/2011 5:24 am by Daryl | 583 views | 0 replies

DarylBeta Tester

Social Media Toolkit - Dynamic page option

As I often use the Social Media Toolkit as a plugin on dynamic pages I have to change the code to also be dynamic.

It would be good if you had a 'static' option for one off pages where you put the full URL (so as not to loose the current functionality) and a dynamic or plugin version where you just put in the domain name and the extension that then adds the php code

php:
<?php echo $_SERVER["PHP_SELF"]; ?>



or make it completely inteligent by adding this code;

php:
<?php
function curPageURL() {
 
$pageURL 'http';
 if (
$_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
 
$pageURL .= "://";
 if (
$_SERVER["SERVER_PORT"] != "80") {
  
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
 } else {
  
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
 }
 return 
$pageURL;
}
?>
php:
<?php
  
echo curPageURL();
?>
php:
<?php
function curPageName() {
 return 
substr($_SERVER["SCRIPT_NAME"],strrpos($_SERVER["SCRIPT_NAME"],"/")+1);
}

echo 
"The current page name is ".curPageName();
?>


Which I got from here - get_current_page_url.php

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...