Simplified Admin. on Stories.

Register an Account
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 06-08-2008, 07:30 PM
davemackey's Avatar
Pligg Donor
Pligg Version: 9.9.
Pligg Template: siChunkBlue
 
Join Date: Aug 2007
Location: Langhorne, PA
Posts: 226
Right now when one opens a Pligg page as an admin. one has to click "Admin links", then some ajax loads and one is able to edit a story or change its status. The ajax seems unnecessary at this juncture to me, so I've simplified the code a bit. To replicate:
1. Open template file link_summary.tpl.
2. Find these lines of code and remove:
Code:
{if $isadmin eq "yes" || $user_logged_in eq $link_submitter}
     <span id="adminlinksbuttom"> | <a href="javascript://" onclick="var replydisplay=document.getElementById('ls_adminlinks-{$link_shakebox_index}').style.display ? '' : 'none';document.getElementById('ls_adminlinks-{$link_shakebox_index}').style.display = replydisplay;">{#PLIGG_Visual_Admin_Links#}</a></span>
{/if}
3. Find the span id which begins with the title ls_adminlinks and cut the entire span of code:
Code:
<span id="ls_adminlinks-{$link_shakebox_index}" style="display:none">
{if $isadmin eq "yes"}
  <span id="ls_admin_links-{$link_shakebox_index}">
  <br /><a href="{$story_edit_url}">{#PLIGG_Visual_LS_Admin_Edit#}</a>
  <br /><a href="{$story_admin_url}"> {#PLIGG_Visual_LS_Admin_Status#}</a>
  {checkActionsTpl location="tpl_link_summary_admin_links"}
  </span>
{else}
  {if $user_logged_in eq $link_submitter}
    <span id="ls_user_edit_links-{$link_shakebox_index}"><br /><a href="{$story_edit_url}">{#PLIGG_Visual_LS_Admin_Edit#}</a></span>
  {/if}
{/if}
</span>
4. Paste this code into the same spot you removed the old code in step two. Remove the <br/> statements in the code and instead place before each | . This will all the navigation to fall on one line.
I'm going to be doing some more work with this admin. stuff shortly...I've got an AJAX inline editor to post with a little bit more work and I want to simplify the multi-step process of publishing/discarding/banning/etc. stories.
David.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stories submitted by users that are not listed in Admin Users list... (RC2) Tomek Wlodarek Questions and Comments 0 02-25-2009 04:41 AM
How to set admin approval for all stories nikola Questions and Comments 6 01-07-2008 10:25 PM
Pligg beta 9.5 [updated] kbeeveer46 Current Version 0 04-29-2007 10:58 PM
email from webmaster@pligg.com when admin updates stories bounder Questions and Comments 1 02-18-2007 06:43 PM
Viewing users' comments and stories via user management in admin panel kbeeveer46 Questions and Comments 0 08-09-2006 06:11 PM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development