Even tho I have the settings set to NOT show the Edit Article link on articles, it still shows, what can I do?
You can delete it from the file. Copy TPortal.template.php to your theme directory(ies) and delete the lines:
// give 'em a edit link? :)
if(allowedTo('tp_articles') && !$story['is_boardnews'] && $context['TPortal']['hide_editarticle_link']=='0')
echo '
<div class="smalltext" style="margin: 2ex 1ex 1ex 1ex;"><a href="' , $scripturl , '?action=tpadmin;sa=editarticle' , $story['id'] , '">[' , $txt['tp-editarticle'] , ']</a>
<a href="' , $scripturl , '?action=tpadmin;sa=editarticle' , $story['id'] , ';visualopts">[' , $txt['tp-editarticle2'] , ']</a>
</div>';
Or you can just put // in front of each of the lines if you don't want to be as drastic as to delete them. :)
Niether of those options worked, the links to edit article and edit options still appear under every article and block containing a article. :(
Okay. Go for the next bit as well
// their own article?
elseif(!$story['is_boardnews'] && !allowedTo('tp_articles') && $story['poster']['id']==$context['user']['id'] && $context['TPortal']['hide_editarticle_link']=='0')
echo '
<div class="smalltext" style="margin: 2ex 1ex 1ex 1ex;"><a href="' , $scripturl , '?action=tpmod;sa=editarticle' , $story['id'] , '">[' , $txt['tp-editarticle'] , ']</a></div>';
You are talking about articles and not blocks, right? The link that says "Edit article"?
I tried that as well and the 2 links keep showing up. I am talking about blocks that have articles in them. The block edit is turned off and doesn't show, and I have the article edit turned off and it shows in the block under the article.
You know what it is?? Admins see everything!! ARGH!!!
If you have removed the code, then the link will not show, because it will not exist. You will have to be sure that you have removed it in the file that corresponds to the TPortal.template.php file that corresponds to the theme you have active.
Really pvcblue, lol :2funny:
I want the editor to pop up and it wont haha
OK now I am realy confused - I have 2 forums set up, exactly alike, one is "live" one is test. When I go into the tp admin - settings - and turn off showing the article edit link, it stays off on the test forum, but I still see it on the live forum.
I am admin on both, so I thought maybe it was a admin thing, but appareantly not.
So what files exactly control this function?
TPortal.template.php
The links are in the code I gave you. If you delete that code, it is impossible for the links to print.
Quote from: JPDeni on February 10, 2007, 12:59:02 AM
TPortal.template.php
The links are in the code I gave you. If you delete that code, it is impossible for the links to print.
Well guess again!! I edited it out and it still shows!! My forum is special it does the impossible! :buck2:
Are you sure you have it for the right theme?
Edited to add:
Are you sure you have edited the right file? I know that I have done this sometimes where I have a test site and I end up editing the files on the live site instead of on the test site.
Quote from: JPDeni on February 10, 2007, 01:20:03 AM
Are you sure you have it for the right theme?
if you did edit the right theme,
then try clearing your cache...
Quote from: JPDeni on February 10, 2007, 01:20:03 AM
Are you sure you have it for the right theme?
Edited to add:
Are you sure you have edited the right file? I know that I have done this sometimes where I have a test site and I end up editing the files on the live site instead of on the test site.
I edited the files for the Default theme, and it is the only theme with TP files. The TP functions are called for from that folder.
and the live site is the one screwing up - the test site works perfectly
:'( :-\ :buck2: :idiot2: :tickedoff:
OK so yesterday I tried all of the suggestions given, they didn't work, I went to te test site and copied all the source folder files and overlayed them on the active site, all that did was lock everyone but me out of the four, replaced the old files and verything is back to the way it was, anymore suggestions? I have to work 3pm-11pm CST, will try them out when I get home. PLEASE HELP!!! :'(
Try posting your TPortal.template.php file.
Quote from: JPDeni on February 10, 2007, 07:00:53 PM
Try posting your TPortal.template.php file.
Ok here ya go -
Try this.
ARGH!! Didn't work, still showing edit links!!! :uglystupid2:
Well, I'm not sure what to say. I noticed a few things when I went to your site. The theme showing is not the default theme, so you may need to change it in the theme that is being used. I also tried to sign up for an account so I could try to see an article, but it said that I had to choose an avatar, even though there were no avatars from which to choose, so I wasn't able to sign up for an account.
Maybe someone else will have an idea. I'm sorry I couldn't be of any more help.
Quote from: JPDeni on February 11, 2007, 01:23:31 PM
Well, I'm not sure what to say. I noticed a few things when I went to your site. The theme showing is not the default theme, so you may need to change it in the theme that is being used. I also tried to sign up for an account so I could try to see an article, but it said that I had to choose an avatar, even though there were no avatars from which to choose, so I wasn't able to sign up for an account.
Maybe someone else will have an idea. I'm sorry I couldn't be of any more help.
Well the theme showing is based on the default theme, and all functions are pulled from the php files in the defualt theme folder. As for the avatar select, well I screwed that up by trying to fix what is wron, now it fixed to work again. Sorry.
Just for fun, have you actually switched the site over to the default theme, even for a minute? It would be worth it to give it a try. Also, it would be a really good idea to check your theme paths to make sure they're pointing to the right place.
Quote from: JPDeni on February 11, 2007, 08:39:14 PM
Just for fun, have you actually switched the site over to the default theme, even for a minute? It would be worth it to give it a try. Also, it would be a really good idea to check your theme paths to make sure they're pointing to the right place.
When I switch ober to the default the left and right columns do not show even tho it is set for them to show, the paths are all correct.
It looks like you have bigger problems than the fact that the Edit Article links show for admins on articles. Personally, I think if the default theme doesn't work right, you don't have either TP or SMF set up correctly somewhere and the more you add on to try to fix it, the deeper you're going to dig the hole that you're in. I could be wrong, of course. It's been known to happen. :)
But you have plumbed the depths of my knowledge for helping with the problem that you have. If I were at the point where you are, I would reinstall everything on a shadow site, starting from the beginning and see if I could work it out from there.
Well I deleted my forum, went on and created a new database, fresh installed SMF and TP, then installed the last database backup, then my MODS, then looked, still cannot get rid of the edit article, edit options links!!! Has to be somewhere in the database, anyone know ????????????
pvcblue, if you'd like I'll take a look at this. I don't know why it would be doing this TBH. Do you get any errors in your log about this?
Quote from: IchBinâ„¢ on February 12, 2007, 02:56:41 PM
pvcblue, if you'd like I'll take a look at this. I don't know why it would be doing this TBH. Do you get any errors in your log about this?
No errors in the error log at all, this is about to drive me mad. My other site is set up exactly the same way, same SMF/TP versions, smae MODS, and it's settings all work correctly, pvcblue.com on the other hand just will not hide the edit articles, edit options links. I am about ready to torch the forum!