TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,004
  • Total Topics: 21,330
  • Online today: 219
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 92
  • Total: 93
  • illori

Edit Article

Started by pvcblue, February 09, 2007, 10:22:40 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

pvcblue

Even tho I have the settings set to NOT show the Edit Article link on articles, it still shows, what can I do?

JPDeni

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. :)

pvcblue

Niether of those options worked, the links to edit article and edit options still appear under every article and block containing a article. :(

JPDeni

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"?

pvcblue

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!!!

JPDeni

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.

brianjw

Really pvcblue, lol :2funny:
I want the editor to pop up and it wont haha

pvcblue

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?

JPDeni

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.

pvcblue

#9
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:

This website is proudly hosted on Crocweb Cloud Website Hosting.