[SOLVED]Author link not working

More
05 Jan 2013 19:20 - 08 Jan 2013 09:35 #532 by allrightweb
Not sure what happened, but the author link stopped working. If necessary you can check the result out at my site . Author is set up with a G+ id. The plugin System - J4Schema Joomla! integration is enabled.

You speak about adding code to the template override, <a href= ... </a> in the documentation, but I am not sure how to do this, and it wasn't added before when it worked.

Any help?
thanks
Neil
Last edit: 08 Jan 2013 09:35 by admin.

Please Log in or Create an account to join the conversation.

More
06 Jan 2013 19:18 #537 by admin
Hi, actually the latest version didn't touch anything about the G+ author.
If it stopped working, probably you touched your template override files.

However, you can fix it easily.
When your template shows the author, you have to change the code from something like this
<?php echo JText::sprintf('COM_CONTENT_WRITTEN_BY', $author); ?>

to something like this:
<a href="{GOOGLE_PLUS_AUTHOR:<?php echo $this->item->created_by?>}">
     <?php echo JText::sprintf('COM_CONTENT_WRITTEN_BY', $author); ?>
</a>
(Actually the code is taken from current template overrides for joomla 2.5)

Tell me if it works for you.

Please Log in or Create an account to join the conversation.

More
07 Jan 2013 16:53 #541 by allrightweb
I am learning about overrides, so this is new ground for me.
I have a file, default_template/html/com_content/article/default.php:

<?php
/**
* @version $Id: default.php 5481 2012-11-29 07:38:30Z arifin $
* @author RocketTheme www.rockettheme.com
* @copyright Copyright (C) 2007 - 2012 RocketTheme, LLC
* @license www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
*/
defined('_JEXEC') or die;
$template_info = JFactory::getApplication()->getTemplate(true);
include JPATH_SITE.'/templates/'.$template_info->template.'/html/base_override.php';

So right now, I think, nothing is overridden. I added the code you gave me, but it returned an error.

What file do I need to override?

thanks

Please Log in or Create an account to join the conversation.

More
08 Jan 2013 02:47 #550 by allrightweb
Never mind the last post, I was looking at the wrong file.

Works find now, thanks

Please Log in or Create an account to join the conversation.

More
08 Jan 2013 09:35 #551 by admin
you're welcome :)

Please Log in or Create an account to join the conversation.

Time to create page: 0.295 seconds