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.
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?
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
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fimg6.imageshack.us%2Fimg6%2F9038%2Ftperror.png&hash=2fa2312366bbf6b64eff6398e7be20b723618be3)
If i click TinyPortal>Articles and click any of the +'s (+HTML +PHP +BBC etc.) i can create an article.
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fimg44.imageshack.us%2Fimg44%2F2020%2Ftperror2.png&hash=d50c95d6724595e15549a481e79fb0d9bb416edc)
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.
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.
Yes thank you very much it is working now
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.
hello, thanks for posting your solution! I became confused with the menu.
What's confusing about it? It should be a simple find and replace for the code.
I have a similar problem, i cant submit mine to the frontpage.
NoFear,
This topic was marked solve quite awhile ago. Please start a new support topic and also Please Read and Follow the Posting Guidelines and be sure to use the posting template at the bottom of that post (http://www.tinyportal.net/index.php?topic=581.0).
ZarPrime