edit article - frontend

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Mon Mar 17, 2014 2:34 pm
Reply with quote
Report this post
hi guys
when a superadmin or author etc login to the frontend, and want to edit an article (joomla articles) there is no option to edit.
there is for modules, but not for articles.

can I get a fix please :) thanks heaps!
User avatar
Platinum Boarder

teitbite
Mon Mar 17, 2014 7:29 pm
Reply with quote
Report this post
Hi

Please tell me which article system are You using. Is it K2 or regular joomla articles.
User avatar
Moderator

GK User
Tue Mar 18, 2014 4:04 am
Reply with quote
Report this post
teitbite wrote:Hi

Please tell me which article system are You using. Is it K2 or regular joomla articles.


hi Teitbite :)

i did already mention it was joomla articles - hehe ;-)
User avatar
Platinum Boarder

teitbite
Tue Mar 18, 2014 8:44 pm
Reply with quote
Report this post
Hi

Sorry. I must have been tired reading it :(

Please edit file /html/com_content/article/default.php and add under line 79 which should looks like this:

Code: Select all
   $params->get('show_hits')


this line

Code: Select all
   || $canEdit
User avatar
Moderator

GK User
Thu Mar 20, 2014 1:59 am
Reply with quote
Report this post
teitbite wrote:Hi

Sorry. I must have been tired reading it :(

Please edit file /html/com_content/article/default.php and add under line 79 which should looks like this:

Code: Select all
   $params->get('show_hits')


this line

Code: Select all
   || $canEdit



thanks - i put it in - but it only shows up when i am logged in as a superuser (Same goes for the social media buttons, which this appears under)

is there a way to show the edit to just those authorised, and the social media buttons to everyone?
User avatar
Platinum Boarder

teitbite
Thu Mar 20, 2014 6:07 pm
Reply with quote
Report this post
Hi

Edit button is displayed or not regarding the joomla settings, so if some users are restricted from editing will not see the button. It's dependable from joomla, not the code n this file.

If You want buttons to show always than You need to change in line 73 of this file value to true. Like this:

Code: Select all
$aside_exists = true;


with the above the modification from my previous post is not neccessary.
User avatar
Moderator

GK User
Fri Mar 21, 2014 7:09 am
Reply with quote
Report this post
teitbite wrote:Hi

Edit button is displayed or not regarding the joomla settings, so if some users are restricted from editing will not see the button. It's dependable from joomla, not the code n this file.

If You want buttons to show always than You need to change in line 73 of this file value to true. Like this:

Code: Select all
$aside_exists = true;


with the above the modification from my previous post is not neccessary.


thanks - that worked, but now i have it showing on my jreviews pages - is there a way to exclude that component?
User avatar
Platinum Boarder

teitbite
Fri Mar 21, 2014 6:09 pm
Reply with quote
Report this post
Hi

Please tell me an url to an example of such page.
User avatar
Moderator

GK User
Sat Mar 22, 2014 7:40 am
Reply with quote
Report this post
teitbite wrote:Hi

Please tell me an url to an example of such page.


there are alot of categories under jreviews... but here are a couple of url's :)

http://guidetogay.com/city-guide/venues ... ar-gosford
http://guidetogay.com/expert-services/e ... axi-shield

if its impossible to turn it off on categories/components... is it possible to move the sidebar to the top under the article title near the article info?? in a single horizontal line.
User avatar
Platinum Boarder

teitbite
Sun Mar 23, 2014 6:59 pm
Reply with quote
Report this post
Hi

That's a little more complicated than I thought ;/ My best idea is to remove the sidebar entirely, from the left side by adding this code to /layout/blocks/head.php:

Code: Select all
   <script type="text/javascript">
   (function($) {
   $(document).ready(function() {
                $('.itemBody').removeClass('gkHasAside');
   });
   })(jQuery)
   </script>


this will make article (or any other content) use 100% of the screen and push social buttons at the bottom. Next step would be to enable override in template settings and add this code to /css/override.css

Code: Select all
.itemAsideInfo {
    right: 0;
}

.itemAsideInfo #gkSocialAPI {
    display: none;
}


Should remove buttons, but left the field in right corner for edit icon. You need to test it, but it's close.
User avatar
Moderator

GK User
Mon Mar 24, 2014 5:48 am
Reply with quote
Report this post
thanks :) sidebar is gone - but the social icons are still running down the left hand side - i would love them to go in the spot under the headline if thats possible horizontally?

have attached a screenshot :)
User avatar
Platinum Boarder

teitbite
Mon Mar 24, 2014 7:44 pm
Reply with quote
Report this post
Hi

Edit /html/com_content/article/default.php in line 238 You will find this code:

Code: Select all
                   <gavern:social><li id="gkSocialAPI"></gavern:social>
                     <gavern:social><a href="http://twitter.com/share" class="twitter-share-button" data-text="<?php echo $this->item->title; ?>" data-url="<?php $cur_url; ?>" GK_TWEET_BTN_SETTINGS>Tweet</a></gavern:social>
                    
                     <gavern:social><fb:like href="<?php echo $cur_url; ?>" GK_FB_LIKE_SETTINGS></fb:like></gavern:social>
                    
                     <gavern:social><g:plusone GK_GOOGLE_PLUS_SETTINGS callback="<?php echo $cur_url; ?>"></g:plusone></gavern:social>
                     <gavern:social><g:plus action="share" GK_GOOGLE_PLUS_SHARE_SETTINGS href="<?php echo $cur_url; ?>"></g:plus></gavern:social>
                    
                     <gavern:social><a href="http://pinterest.com/pin/create/button/?url=<?php echo $cur_url; ?>&amp;media=<?php echo $pin_image; ?>&amp;description=<?php echo str_replace(" ", "%20", $this->item->title); ?>" class="pin-it-button" count-layout="GK_PINTEREST_SETTINGS"><img border="0" src="//assets.pinterest.com/images/PinExt.png" title="<?php echo JText::_('TPL_GK_LANG_PINIT_TITLE'); ?>" /></a></gavern:social>
                   <gavern:social></li></gavern:social>


cut it from this place and paste under line 159, just under ending condition for <head> part, but adding small code at start and end.

Code: Select all
<ul>HERE COMES THE CUT PART OF CODE</ul>
User avatar
Moderator


cron