PDA


View Full Version : Edit button removal?


jrcart
06-26-2005, 11:58 PM
I tried searching and couldn't find much, but... is there anyway to remove the EDIT button that's at the bottom of all of my recent news posts? Anyone who logs in to the CMPS homepage can see them... once they click they can't do anything, but I still would rather only Admin or Mod's to see that button? Any suggestions? My site is below for reference...

http://www.collegesportssource.com

jrcart
06-27-2005, 05:19 PM
here's a screen shot of what I mean:

Zachery
06-27-2005, 05:31 PM
Only users who have permission to edit should see them..

jrcart
06-27-2005, 05:53 PM
This only happens on the vBadvanced homepage.... throught the rest of my vBulletin site they are not seen by other users.. only those permitted.... why do these show up on the vBadvanced homepage only?

YSR50
06-28-2005, 01:20 PM
This only happens on the vBadvanced homepage.... throught the rest of my vBulletin site they are not seen by other users.. only those permitted.... why do these show up on the vBadvanced homepage only?+1

ConqSoft
06-28-2005, 01:36 PM
Only users who have permission to edit should see them..

It shows up to everyone though. Even here on vbadvanced.com, I can see the edit button on Brian's news items on the home page.

YSR50
06-28-2005, 02:55 PM
was it this way in version 1?

tweaked2
06-29-2005, 12:00 PM
I'd like to know not only how to get rid of the edit button, but also the views and the "by" listing the person that posted the message. I can't seem to do that. HELP!

jrcart
06-29-2005, 01:28 PM
OK, mod's, please tell me if this is ok to do to my vBadvanced... but:

I went in to adv_portal_newsbits. Look for:
<if condition="$show['editbutton']">
<a href="$vboptions[bburl]/editpost.php?$session[sessionurl]do=editpost&amp;p=$news[postid]"><img alt="$vbphrase[edit_this_post]" border="0" src="$stylevar[imgdir_button]/edit.gif" /></a>

and delete it.... It removed the link from the homepage, but kept it in my vBulletin forums... hope this works!

Brian
06-29-2005, 05:30 PM
For anyone that's having this problem, if you'll look in your modules/news.php file for this code:
$show['editbutton'] = iif(($newsforumperms["$news[forumid]"] & CANEDITPOST), true, false);

Replace with this:
$show['editbutton'] = false;

if ((($newsforumperms["$news[forumid]"] & CANEDITPOST) AND $bbuserinfo['userid'] == $news['userid']) OR can_moderate($thread['forumid'], 'caneditposts'))
{
$show['editbutton'] = true;
}


And that should change it so that only users with permission to edit the post will see the button.

tweaked2
06-29-2005, 05:41 PM
Brian,

What about getting rid of the views and the "by" showing who posted it?

Thanks,

David

Brian
06-29-2005, 05:50 PM
You would need to edit your adv_portal_newsbits template and remove the code from there.

jrcart
06-29-2005, 06:29 PM
For anyone that's having this problem, if you'll look in your modules/news.php file for this code:

Where exactly do I find this?

EDIT: nm, found it.... works great! Thanks Brian

YSR50
06-29-2005, 10:51 PM
For anyone that's having this problem...

Thanks Brian