PerryW
PerryW

Reputation: 99

How to get the URL of the current page with the title and post it to Digg?

We have a Joomla site and have purchased a template from Gavick. I need to change the code which is part of a template we have purchased.

If I hardcode the parameters associated to the Digg button as follows then I am taken to Digg's website submission link form and can add the details.

The current code in the template is as follows:

<?php if($this->template->params->get("icon2", 1) == 1) : ?>
<a href="<?php echo $this->template->params->get("icon2_link", ''); ?>"
class="social_icon" id="social_icon2" target="_blank">Digg</a><?php endif; ?>

What I need to do is get the URL of the current page along with the title and post this to Digg.

Upvotes: 0

Views: 281

Answers (1)

Dejan Marjanović
Dejan Marjanović

Reputation: 19380

Never used Joomla but...

<?php if($this->template->params->get("icon2", 1) == 1) : ?>
<a href="http://digg.com/submit?Url=<?php echo $_SERVER["REQUEST_URI"]?>&title=<?=mainframe->getPageTitle()?>&no_mobile=1"
class="social_icon" id="social_icon2" target="_blank">Digg</a><?php endif; ?>

I don't know variable for title.

Upvotes: 1

Related Questions