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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,970
  • Latest: bynw
Stats
  • Total Posts: 196,055
  • Total Topics: 21,337
  • Online today: 194
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 175
  • Total: 175

Can't Submit An Article

Started by droz928, May 23, 2010, 07:06:25 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

droz928

Every time i try to submit a new article all i get is a blank page with TP Admin in it. It doesn't matter if i try "Write an HTML article" or "Write a BBC article".
I can add articles through the TPadmin panel, but other staff members can not unless i give them access to the admin panel.

I have attached a copy of my TPortalAdmin.template.php

I am using SMF 2.0rc3 and tinyPortal 1.0 beta 5-1

This error also appears in the error log

http://www.gimpdome.com/index.php?action=tpadmin;sa=submitarticle
2: call_user_func(template_submitarticle) [<a href='function.call-user-func'>function.call-user-func</a>]: First argument is expected to be a valid callback

File: /home/gimpdome/public_html/Themes/default/TPortalAdmin.template.php (main sub template - eval?)
Line: 75


please could any one help or at least point me in the right direction.

IchBin

Ok so which is it? First you say that you can't add articles:
QuoteEvery time i try to submit a new article all i get is a blank page with TP Admin in it. It doesn't matter if i try "Write an HTML article" or "Write a BBC article".

Then you say you can add articles:
QuoteI can add articles through the TPadmin panel, but other staff members can not unless i give them access to the admin panel.

So which is it? You can or can't add articles?

If you are getting an error when submitting an error, are you looking into your error log for SMF? Are you looking into your server log to see if it gives you any error too?

For the other users, have you given them permission to submit? Have you given them permission to view the category?

droz928

Sorry that does sound confusing.
On the main button bar - TinyPortal>Write HTML(BBC) Article - this does not work. It takes me to a blank page that just says TP Admin


If i click TinyPortal>Articles and click any of the +'s  (+HTML +PHP +BBC etc.) i can create an article.


I have set all the permissions for the moderators to submit articles as far i knew admins should be able to by default.
the error i submitted is coming from SMF error log.

IchBin

Aha! Thank you for the clarification. :) I do believe the menu needs to be changed. The main menu links to this:
http://www.ichbin.us/index.php?action=tpmod;sa=submitarticle

The correct menu from the (userbox) links to this:
http://www.ichbin.us/index.php?action=tpmod;sa=addarticle_html

As you can see they are not the same. I think the main menu was the old way, which is obviously changed. :) You can make this change yourself if you need to. In the Sources/TPSubs.php file find this code:
    if(allowedTo('tp_submithtml'))
    {
        $buts['tpsubmithtml'] = array(
                        'title' => $txt['tp-submitarticle'],
                        'href' => $scripturl . '?action=tp' . (allowedTo('tp_articles') ? 'admin' : 'mod') . ';sa=submitarticle',
                        'show' => true,
                        'active_button' => false,
                        'sub_buttons' => array(
                        ),
                    );
    }
    if(allowedTo('tp_submitbbc'))
    {
        $buts['tpsubmitbbc'] = array(
                        'title' => $txt['tp-submitarticlebbc'],
                        'href' => $scripturl . '?action=tp' . (allowedTo('tp_articles') ? 'admin' : 'mod') . ';sa=submitarticlebbc',
                        'show' => true,
                        'active_button' => false,
                        'sub_buttons' => array(
                        ),
                    );
    }


Replace with this:
    if(allowedTo('tp_submithtml'))
    {
        $buts['tpsubmithtml'] = array(
                        'title' => $txt['tp-submitarticle'],
                        'href' => $scripturl . '?action=tp' . (allowedTo('tp_articles') ? 'admin' : 'mod') . ';sa=addarticle_html',
                        'show' => true,
                        'active_button' => false,
                        'sub_buttons' => array(
                        ),
                    );
    }
    if(allowedTo('tp_submitbbc'))
    {
        $buts['tpsubmitbbc'] = array(
                        'title' => $txt['tp-submitarticlebbc'],
                        'href' => $scripturl . '?action=tp' . (allowedTo('tp_articles') ? 'admin' : 'mod') . ';sa=addarticle_bbc',
                        'show' => true,
                        'active_button' => false,
                        'sub_buttons' => array(
                        ),
                    );
    }


I think that should fix it.

droz928

Yes thank you very much it is working now

echobeam

Hi all, I've tried for this same problem an htaccess rewrite approach, by adding the following.


RewriteCond %{QUERY_STRING}  ^action=tpadmin;sa=submitarticlebbc$
RewriteRule ^(.*)$ $0?action=tpadmin;sa=addarticle_bbc [L]

And the same for action=tpmod.

I'm not an expert, so I do expect it can be done much better than this, which anyway works for me.
And of course it works for Apache only.
I just have to remeber to check next TP update.

scept1c

hello, thanks for posting your solution! I became confused with the menu.

IchBin

What's confusing about it? It should be a simple find and replace for the code.

NoFeaR

I have a similar problem, i cant submit mine to the frontpage.

ZarPrime


This website is proudly hosted on Crocweb Cloud Website Hosting.