The Joomla! Forum ™



Forum rules


Please use the mailing list here: http://groups.google.com/group/joomla-dev-general rather than this forum.



Post new topic Reply to topic  [ 35 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Google Plus Author Links
PostPosted: Tue Sep 27, 2011 4:14 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Apr 08, 2010 4:41 am
Posts: 16
Had a quick look around and noticed that there didn't seem to be anything like this around at the moment.. Or my searching just sucks..

But wanted to implement the Google Plus author links to show your author profile on Google if your using G+.
http://www.google.com/support/webmaster ... er=1408986

Please note, any privacy concerns etc are completely up to the person on G+ to manage. This simply links to their designated profile.

This is sample idea for those who can actually write components etc. Anyone can use this code if they feel like it but if your going to use it, at least credit me in your work please.

If you want an example of it, then you can check it out at:
http://www.weirynet.com

This is not a module or a component, because i couldn't be bothered. It is a patch to com_content tmpl files. Therefore i am not using Joomla's in build database query functions etc. If you want that, then someone can rewrite it to work off that.

If you use this, then you it won't let you use Joomla's default contact details page. However you could still link it if you really wanted to by adding the location of the contact page into the contact's webpage field.

Step 1.
Put the vNetWebAuthor class file in the components/com_content/helpers/ directory. (attached to this post)

Step 2.
For each view of articles, find the <dd class="createdby"> and look inside there for JText::sprintf('COM_CONTENT_WRITTEN_BY' ...

Replace the "COM_CONTENT_WRITTEN_BY" sprintf function with this:
Code:
require_once JPATH_COMPONENT.'/helpers/vNetWebAuthor.php';
$vnet = new vNetWebAuthor();
$cntlink = $vnet->getWebLink($this->item->contactid);
echo JText::sprintf('COM_CONTENT_WRITTEN_BY', JHtml::_('link', JRoute::_($cntlink), $author)); ?>


Step 3.
Add your user contact details to Joomla's Contact section and link it to your user.
For the web page field, make this your G+ profile URL.


vNetWebAuthor Class
Code:
<?php
/*
 * @file vNetWebAuthor.php
 * @description Author link to contact webpage
 * @author James Weir
 * @website www.weirynet.com
 */

class vNetWebAuthor extends JConfig{

        private $link;

        public function __construct(){

                $this->link = mysql_connect($this->host, $this->user, $this->password) or die("MySQL Error: ".mysql_error());
                mysql_select_db($this->db, $this->link);

        }

        public function getWebLink($userID){

                $q = sprintf("SELECT `webpage` FROM `".$this->dbprefix."contact_details` WHERE `id` = '%s'",
                        mysql_real_escape_string($userID));

                $r = mysql_query($q,$this->link);

                if(mysql_num_rows($r) == 1){
                          $arr = mysql_fetch_assoc($r);
                        return $arr['webpage'].'?rel=author';
                }
                return false;
        }
}
?>



Thoughts or comments?
Try to leave some constructive feedback if you see fit, keeping in mind my obvious explanations posted above.
I may not check this afterwards, however i thought it would be useful for people to see.


Top
 Profile  
 
PostPosted: Tue Sep 27, 2011 6:37 am 
Joomla! Ace
Joomla! Ace

Joined: Sat Jan 21, 2006 8:42 pm
Posts: 1083
Nice idea, here another one for that

Code:
<?php
$db = JFactory::getDbo();
$query = 'SELECT `webpage` FROM `#__contact_details` WHERE `id` = '. (int) $this->item->contactid;
$db->setQuery($query);
$page = $db->loadResult().'?rel=author';
echo JText::sprintf('COM_CONTENT_WRITTEN_BY', JHtml::_('link', JRoute::_($page), $author));
?>


Top
 Profile  
 
PostPosted: Tue Sep 27, 2011 12:58 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Apr 08, 2010 4:41 am
Posts: 16
RedEye wrote:
Nice idea, here another one for that


Excellent :D

Thanks for that RedEye, i knew there would be a better way around it, but due to lack of time in learning the functionality of Joomla's core, i haven't gotten around to figure much out yet :)


Top
 Profile  
 
PostPosted: Thu Nov 17, 2011 10:40 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Thu Nov 17, 2011 10:37 pm
Posts: 4
I find this very useful, however, it didn't work, and I want it so much!

I'm not a programmer, so I think I failed with this replacing part (part 2) - can somebody tell which part to replace and in what file?


Top
 Profile  
 
PostPosted: Thu Nov 17, 2011 10:48 pm 
Joomla! Ace
Joomla! Ace

Joined: Sat Jan 21, 2006 8:42 pm
Posts: 1083
works at the time we write our posts here, not tested it again, have you done step 3 from JWeiry`s first post?
Quote:
Step 3.
Add your user contact details to Joomla's Contact section and link it to your user.
For the web page field, make this your G+ profile URL.


Top
 Profile  
 
PostPosted: Thu Nov 17, 2011 11:00 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Thu Nov 17, 2011 10:37 pm
Posts: 4
Thank you for your reply!

I did, I added the Google+ page to Contact form, but click on author name then redirects me to "Contact", and still shows user's Google+ page as normal page, when it should link from article directly to Google+ page, right?

I think I didn't do the replacement right. :(
(It doesn't say which files to edit exactly, and what exactly to replace)


Top
 Profile  
 
PostPosted: Thu Nov 17, 2011 11:03 pm 
Joomla! Ace
Joomla! Ace

Joined: Sat Jan 21, 2006 8:42 pm
Posts: 1083
well than where is the code from your file, so that we can take a look :p


Top
 Profile  
 
PostPosted: Thu Nov 17, 2011 11:10 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Thu Nov 17, 2011 10:37 pm
Posts: 4
You're so kind, I'd marry you :D

Tried to do it for the featured articles, so I edited com_content > views > featured > default.php

Code:
<?php if ($params->get('show_author') && !empty($this->item->author )) : ?>
   <dd class="createdby">
   <?php $author = $this->item->created_by_alias ? $this->item->created_by_alias : $this->item->author; ?>
   <?php if (!empty($this->item->contactid) && $params->get('link_author') == true): ?>
   <?php
      $needle = 'index.php?option=com_contact&view=contact&id=' . $this->item->contactid;
      $item = JSite::getMenu()->getItems('link', $needle, true);
      $cntlink = !empty($item) ? $needle . '&Itemid=' . $item->id : $needle;
   ?>
      <?php echo JText::require_once JPATH_COMPONENT.'/helpers/vNetWebAuthor.php';
$vnet = new vNetWebAuthor();
$cntlink = $vnet->getWebLink($this->item->contactid);
echo JText::sprintf('COM_CONTENT_WRITTEN_BY', JHtml::_('link', JRoute::_($cntlink), $author)); ?> JHtml::_('link', JRoute::_($cntlink), $author)); ?>
   <?php else: ?>
      <?php echo JText::sprintf('COM_CONTENT_WRITTEN_BY', $author); ?>
   <?php endif; ?>
   </dd>
<?php endif; ?>


Once again, thank you very much for your help!


Top
 Profile  
 
PostPosted: Thu Nov 17, 2011 11:26 pm 
Joomla! Ace
Joomla! Ace

Joined: Sat Jan 21, 2006 8:42 pm
Posts: 1083
replace your code with the following, if you enable linking to author it should use Joomla contact page, disabled G+ link
vNetWebAuthor.php - you don`t need this file, step3 and the code I posted before should do the job
Code:
<?php if ($params->get('show_author') && !empty($this->item->author )) : ?>
   <dd class="createdby">
   <?php $author = $this->item->created_by_alias ? $this->item->created_by_alias : $this->item->author; ?>
   <?php if (!empty($this->item->contactid) && $params->get('link_author') == true): ?>
   <?php
      $needle = 'index.php?option=com_contact&view=contact&id=' . $this->item->contactid;
      $item = JSite::getMenu()->getItems('link', $needle, true);
      $cntlink = !empty($item) ? $needle . '&Itemid=' . $item->id : $needle;
   ?>
<?php echo JText::sprintf('COM_CONTENT_WRITTEN_BY', JHtml::_('link', JRoute::_($cntlink), $author)); ?>
   <?php else: ?>
    <?php
$db = JFactory::getDbo();
$query = 'SELECT `webpage` FROM `#__contact_details` WHERE `id` = '. (int) $this->item->contactid;
$db->setQuery($query);
$page = $db->loadResult().'?rel=author';
echo JText::sprintf('COM_CONTENT_WRITTEN_BY', JHtml::_('link', JRoute::_($page), $author));
?>
   <?php endif; ?>
   </dd>
<?php endif; ?>


Top
 Profile  
 
PostPosted: Thu Nov 17, 2011 11:55 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Thu Nov 17, 2011 10:37 pm
Posts: 4
It worked! It worked! Thank you so much! <3 <3 <3 <3 <3


Top
 Profile  
 
PostPosted: Fri Jan 27, 2012 12:56 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Nov 12, 2011 6:30 pm
Posts: 9
I want just to add the rel="author" tag to the link of the author name of an article. How can I do it? thanks


Top
 Profile  
 
PostPosted: Sat Jan 28, 2012 5:52 pm 
Joomla! Ace
Joomla! Ace

Joined: Sat Jan 21, 2006 8:42 pm
Posts: 1083
change JHtml::_() call, attribs are passed as array
from
JHtml::_('link', JRoute::_($page), $author)
to
JHtml::_('link', JRoute::_($page), $author, array('rel' => 'author'))
see JHtml::link()


Top
 Profile  
 
PostPosted: Thu Feb 09, 2012 5:11 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Jul 01, 2006 4:00 pm
Posts: 28
I don't think this is working any more in J2.5.1. I edited the file components>com_content>views>article>tmpl>default.php and I used the code quoted here and it didn't work.

If I have Joomla setup to not link author names the names show up without a link. If I select the option to link author names then it links to the Joomla author's contact page showing the G+ link in the website field.

Any ideas? Can anyone put this in a plugin, so we can avoid editing all the tmpl files in the different article views?

RedEye wrote:
replace your code with the following, if you enable linking to author it should use Joomla contact page, disabled G+ link
vNetWebAuthor.php - you don`t need this file, step3 and the code I posted before should do the job
Code:
<?php if ($params->get('show_author') && !empty($this->item->author )) : ?>
   <dd class="createdby">
   <?php $author = $this->item->created_by_alias ? $this->item->created_by_alias : $this->item->author; ?>
   <?php if (!empty($this->item->contactid) && $params->get('link_author') == true): ?>
   <?php
      $needle = 'index.php?option=com_contact&view=contact&id=' . $this->item->contactid;
      $item = JSite::getMenu()->getItems('link', $needle, true);
      $cntlink = !empty($item) ? $needle . '&Itemid=' . $item->id : $needle;
   ?>
<?php echo JText::sprintf('COM_CONTENT_WRITTEN_BY', JHtml::_('link', JRoute::_($cntlink), $author)); ?>
   <?php else: ?>
    <?php
$db = JFactory::getDbo();
$query = 'SELECT `webpage` FROM `#__contact_details` WHERE `id` = '. (int) $this->item->contactid;
$db->setQuery($query);
$page = $db->loadResult().'?rel=author';
echo JText::sprintf('COM_CONTENT_WRITTEN_BY', JHtml::_('link', JRoute::_($page), $author));
?>
   <?php endif; ?>
   </dd>
<?php endif; ?>


Top
 Profile  
 
PostPosted: Thu Feb 09, 2012 7:21 pm 
Joomla! Ace
Joomla! Ace

Joined: Sat Jan 21, 2006 8:42 pm
Posts: 1083
I`m not tested this in J2.5 but it should work.
Also it`s not recommend to edit com_content, you should do this in a template override.

Ok after reading your post again I tested this, because what you describe can not be to the simple fact that when you activate "link to author" in Joomla the php code what creates the G+ link is not executed and can not display the google link.
However Joomla code has also changed a bit here, but only for the Joomla link to the contact page, so in 2.5 it looks like this and it worked.
Code:
<?php if ($params->get('show_author') && !empty($this->item->author )) : ?>
   <dd class="createdby">
      <?php $author =  $this->item->author; ?>
      <?php $author = ($this->item->created_by_alias ? $this->item->created_by_alias : $author);?>

         <?php if (!empty($this->item->contactid ) &&  $params->get('link_author') == true):?>
            <?php    echo JText::sprintf('COM_CONTENT_WRITTEN_BY' ,
             JHtml::_('link', JRoute::_('index.php?option=com_contact&view=contact&id='.$this->item->contactid), $author)); ?>

         <?php else :?>
            <?php //echo JText::sprintf('COM_CONTENT_WRITTEN_BY', $author); ?>
<?php
$db = JFactory::getDbo();
$query = 'SELECT `webpage` FROM `#__contact_details` WHERE `id` = '. (int) $this->item->contactid;
$db->setQuery($query);
$page = $db->loadResult().'?rel=author';
echo JText::sprintf('COM_CONTENT_WRITTEN_BY', JHtml::_('link', JRoute::_($page), $author));
?>
            
         <?php endif; ?>
   </dd>
<?php endif; ?>


Top
 Profile  
 
PostPosted: Thu Feb 09, 2012 8:13 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Jul 01, 2006 4:00 pm
Posts: 28
Thank you so much!

I'm eager to test this, but... how do I create a template override for this?


Top
 Profile  
 
PostPosted: Thu Feb 09, 2012 8:18 pm 
Joomla! Ace
Joomla! Ace

Joined: Sat Jan 21, 2006 8:42 pm
Posts: 1083
miggalvez wrote:
how do I create a template override for this?

pls take a look here http://docs.joomla.org/How_to_override_ ... omla!_core


Top
 Profile  
 
PostPosted: Thu Feb 09, 2012 8:56 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Jul 01, 2006 4:00 pm
Posts: 28
Awesome! It works! Thanks a lot!


Top
 Profile  
 
PostPosted: Thu Feb 09, 2012 9:01 pm 
Joomla! Ace
Joomla! Ace

Joined: Sat Jan 21, 2006 8:42 pm
Posts: 1083
you`re welcome


Top
 Profile  
 
PostPosted: Thu Feb 09, 2012 9:32 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Jul 01, 2006 4:00 pm
Posts: 28
The code does what it is supposed to, but I tested my articles to check if Google saw the authorship markup and I got an error saying that it didn't.

I think Google's guidelines have changed with respect to this. According to this page http://support.google.com/webmasters/bi ... er=1229920 the correct syntax would be something like this:

Quote:
The article should link to your Google Profile using rel="author", like this:
Check out <a href="https://plus.google.com/101169865857654555922" rel="author">John's Google+ profile</a>.


What do I have to change in the code for it to render in that way?


Top
 Profile  
 
PostPosted: Thu Feb 09, 2012 9:42 pm 
Joomla! Ace
Joomla! Ace

Joined: Sat Jan 21, 2006 8:42 pm
Posts: 1083
pls test this for me :)
$page = $db->loadResult().'?rel=author';
to
$page = $db->loadResult();
and
echo JText::sprintf('COM_CONTENT_WRITTEN_BY', JHtml::_('link', JRoute::_($page), $author));
to
echo JText::sprintf('COM_CONTENT_WRITTEN_BY', JHtml::_('link', JRoute::_($page), $author, array('rel' => 'author')));

edit: add missing closing parenthesis


Last edited by RedEye on Thu Feb 09, 2012 9:56 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Thu Feb 09, 2012 9:51 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Jul 01, 2006 4:00 pm
Posts: 28
Yes!! Almost perfect. A closing parenthesis was missing. Here is the final code:

Code:
<?php if ($params->get('show_author') && !empty($this->item->author )) : ?>
   <dd class="createdby">
      <?php $author =  $this->item->author; ?>
      <?php $author = ($this->item->created_by_alias ? $this->item->created_by_alias : $author);?>

         <?php if (!empty($this->item->contactid ) &&  $params->get('link_author') == true):?>
            <?php    echo JText::sprintf('COM_CONTENT_WRITTEN_BY' ,
             JHtml::_('link', JRoute::_('index.php?option=com_contact&view=contact&id='.$this->item->contactid), $author)); ?>

         <?php else :?>
            <?php //echo JText::sprintf('COM_CONTENT_WRITTEN_BY', $author); ?>
<?php
$db = JFactory::getDbo();
$query = 'SELECT `webpage` FROM `#__contact_details` WHERE `id` = '. (int) $this->item->contactid;
$db->setQuery($query);
$page = $db->loadResult()';
echo JText::sprintf('COM_CONTENT_WRITTEN_BY', JHtml::_('link', JRoute::_($page), $author, array('rel' => 'author')));
?>
           
         <?php endif; ?>
   </dd>
<?php endif; ?>


Top
 Profile  
 
PostPosted: Sun Mar 11, 2012 1:21 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Jul 15, 2007 9:49 pm
Posts: 10
RedEye wrote:
I`m not tested this in J2.5 but it should work.
However Joomla code has also changed a bit here, but only for the Joomla link to the contact page, so in 2.5 it looks like this and it worked.
Code:
<?php if ($params->get('show_author') && !empty($this->item->author )) : ?>
   <dd class="createdby">
      <?php $author =  $this->item->author; ?>
      <?php $author = ($this->item->created_by_alias ? $this->item->created_by_alias : $author);?>

         <?php if (!empty($this->item->contactid ) &&  $params->get('link_author') == true):?>
            <?php    echo JText::sprintf('COM_CONTENT_WRITTEN_BY' ,
             JHtml::_('link', JRoute::_('index.php?option=com_contact&view=contact&id='.$this->item->contactid), $author)); ?>

         <?php else :?>
            <?php //echo JText::sprintf('COM_CONTENT_WRITTEN_BY', $author); ?>
<?php
$db = JFactory::getDbo();
$query = 'SELECT `webpage` FROM `#__contact_details` WHERE `id` = '. (int) $this->item->contactid;
$db->setQuery($query);
$page = $db->loadResult().'?rel=author';
echo JText::sprintf('COM_CONTENT_WRITTEN_BY', JHtml::_('link', JRoute::_($page), $author));
?>
            
         <?php endif; ?>
   </dd>
<?php endif; ?>


Subject: Google Plus Author Links
Code:
<?php if ($params->get('show_author') && !empty($this->item->author )) : ?>
   <dd class="createdby">
      <?php $author =  $this->item->author; ?>
      <?php $author = ($this->item->created_by_alias ? $this->item->created_by_alias : $author);?>

         <?php if (!empty($this->item->contactid ) &&  $params->get('link_author') == true):?>
            <?php    echo JText::sprintf('COM_CONTENT_WRITTEN_BY' ,
             JHtml::_('link', JRoute::_('index.php?option=com_contact&view=contact&id='.$this->item->contactid), $author)); ?>

         <?php else :?>
            <?php //echo JText::sprintf('COM_CONTENT_WRITTEN_BY', $author); ?>
<?php
$db = JFactory::getDbo();
$query = 'SELECT `webpage` FROM `#__contact_details` WHERE `id` = '. (int) $this->item->contactid;
$db->setQuery($query);
$page = $db->loadResult().'?rel=author';
echo JText::sprintf('COM_CONTENT_WRITTEN_BY', JHtml::_('link', JRoute::_($page), $author));
?>
            
         <?php endif; ?>
   </dd>
<?php endif; ?>
[/quote]

Hi Redeye; I used your code above with Joomla 2.5.1 and it works very good. thanks for your help. One problem I have, now I see two Written By at the articles, first one appears at the beginning of the article it does not have the link to GooglePlus, second one appears at the end of the article and it shows link to GooglePlus page and it works fine.
How can I get rid of the first Written by at the beginning of the article?
thanks for your help,
Lewis


Top
 Profile  
 
PostPosted: Sun Mar 11, 2012 1:30 pm 
Joomla! Ace
Joomla! Ace

Joined: Sat Jan 21, 2006 8:42 pm
Posts: 1083
The current example you can find in the post from miggalvez viewtopic.php?f=642&t=660231#p2740737.
If you have two author links in your page check your override and the rest of the file if the author is added somewhere else a second time.


Top
 Profile  
 
PostPosted: Sun Mar 11, 2012 8:06 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Jul 15, 2007 9:49 pm
Posts: 10
great. it works, thanks for your help,
Lewis


Top
 Profile  
 
PostPosted: Tue Apr 03, 2012 6:32 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Sun Sep 25, 2005 3:57 pm
Posts: 118
Location: Atlanta, GA
Thanks for this post. Very Helpful.

Does anyone know of a plugin that is able to accomplish this?

Thanks! -- Steven

_________________
http://www.intownwebdesign.com


Top
 Profile  
 
PostPosted: Tue May 15, 2012 1:12 am 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Mar 27, 2012 10:37 pm
Posts: 13
Location: Atlanta
Great idea!

Does anyone know if there are any good plugins for this?

Thanks!

_________________
Joomla Hosting Reviews and More: http://joomlahosting.co


Top
 Profile  
 
PostPosted: Tue May 29, 2012 5:01 pm 
Joomla! Ace
Joomla! Ace

Joined: Wed Nov 05, 2008 11:28 pm
Posts: 1229
hello dear Steven hello DbStudio hello dear Redeye

many many thanks for the great thread - i stumbled across this - and well this is very very interesting.

eskwire wrote:
Thanks for this post. Very Helpful.

Does anyone know of a plugin that is able to accomplish this?

Thanks! -- Steven


i eagerly want to know this - just let us figure out how this can be accomplished

Look forward to a fruitful discussion

greetings - ;)

_________________
regards un-leash,
a big fan for ++ 8 years now: With Joomla you can easily create and extend your website: see the site, that offers you ideas & modules - extensions.joomla.org - it lists over 4000 extensions


Top
 Profile  
 
PostPosted: Tue May 29, 2012 8:01 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Sun Sep 25, 2005 3:57 pm
Posts: 118
Location: Atlanta, GA
I have not been able to find a plugin that would accomplish this when using just the Joomla core.

There is one that works when you are using Community Builder or Jomsocial. I am not positive about this.

I am in the process of getting one built, it still may be a while.

If I get a working solution I will post my solution here.

Hope this helps! -- Steven

_________________
http://www.intownwebdesign.com


Top
 Profile  
 
PostPosted: Thu May 31, 2012 4:15 pm 
Joomla! Ace
Joomla! Ace

Joined: Wed Nov 05, 2008 11:28 pm
Posts: 1229
hello Steven

thx for writing back and yes: for steppin up the plate. You defintly deserve a monster congratulation for your engaged work. I am pretty sure that many many of Joomla-Fans are waitin to hear from here ....

greetings

_________________
regards un-leash,
a big fan for ++ 8 years now: With Joomla you can easily create and extend your website: see the site, that offers you ideas & modules - extensions.joomla.org - it lists over 4000 extensions


Top
 Profile  
 
PostPosted: Mon Nov 26, 2012 3:20 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Apr 21, 2011 6:34 pm
Posts: 11
Thanks to all of you, work good on Joomla 2.5.8
it's nice for people like me that never know about coding, :)

and please help me to put this code

Code:
target="_blank"


to this :eek:
Code:
<?php if ($params->get('show_author') && !empty($this->item->author )) : ?>
   <dd class="createdby">
      <?php $author =  $this->item->author; ?>
      <?php $author = ($this->item->created_by_alias ? $this->item->created_by_alias : $author);?>

         <?php if (!empty($this->item->contactid ) &&  $params->get('link_author') == true):?>
            <?php    echo JText::sprintf('COM_CONTENT_WRITTEN_BY' ,
             JHtml::_('link', JRoute::_('index.php?option=com_contact&view=contact&id='.$this->item->contactid), $author)); ?>

         <?php else :?>
            <?php //echo JText::sprintf('COM_CONTENT_WRITTEN_BY', $author); ?>
<?php
$db = JFactory::getDbo();
$query = 'SELECT `webpage` FROM `#__contact_details` WHERE `id` = '. (int) $this->item->contactid;
$db->setQuery($query);
$page = $db->loadResult().'?rel=author';
echo JText::sprintf('COM_CONTENT_WRITTEN_BY', JHtml::_('link', JRoute::_($page), $author));
?>
           
         <?php endif; ?>
   </dd>
<?php endif; ?>

_________________
Please read the Forum rules regarding signatures: viewtopic.php?t=65


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 35 posts ]  Go to page 1, 2  Next



Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group