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: 195,994
  • Total Topics: 21,325
  • Online today: 337
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 244
  • Total: 244

Need urgent help as rss screwed my portal/forum up!

Started by misjka, January 04, 2006, 09:28:39 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

misjka

Glp! I'm in trouble over here since I activated a RSS feed as a center block... It kind of took over the whole contents on the portal AND forum, whether I press the Home, Forum, Admin or TPAdmin button... I.e., there is no forum posts to be seen, neither nor any other blocks than the RSS feed block, and worse - I cannot reach the admin panels  :tickedoff:...

So, what file should I change to manually shut off that rss feed...? I have searched through some of the php files without finding what I'm looking for...

Rasyr

I think that the easiest way is going to be by using phpMyAdmin to make the change in the database directly. Whether or not a given block is shown is controlled by a field in the database, so the only way to make the change in the php files would be to change the database call to prevent all blocks from being shown.


  • Go to your phpMyAdmin control panel
  • Go to the database for your site
  • Go to the tportal_blocks table on the left hand list of tables, click on it
  • Click on the Browse tab at the top, in the right hand panel.
  • Find the row that contains the RSS block
  • Click on the little pencil icon on the left side of the row
  • Find the field that is named "off", change the value from 0 to 1
  • Click Save.
You then should be able to get back into the tpadmin screens of your site.

Be very careful if you follow the above directions. Don't change anything else.

To turn it off temporarily via the php file, go to sources/TPortal.php

Find (approximately line 108- 116):
// get the blocks
    $test_Themebox = false; $blocktype=array('no','userbox','newsbox','statsbox','searchbox','html','onlinebox','themebox','shoutbox','catmenu','phpbox','scriptbox','recentbox','ssi','module','rss');

if(isset($_REQUEST['tptest']) && $context['user']['is_admin']){
$pre_id=$_REQUEST['tptest'];
$request = db_query("SELECT * FROM {$tp_prefix}blocks WHERE off=0 OR id=$pre_id ORDER BY bar,pos,id ASC", __FILE__, __LINE__);
}
else
$request = db_query("SELECT * FROM {$tp_prefix}blocks WHERE off=0 ORDER BY bar,pos,id ASC", __FILE__, __LINE__);

Change both instances of WHERE off=0 to WHERE off=2 and save it.

Then go to your website. All of the blocks will be missing at this point. However, you should be able to get into TPAdmin and turn the RSS block off. Once that is done, you then have to go back into the sources/TPortal.php file and reverse the changes you made to it. Changing both instances of WHERE off=2 back to WHERE off=0 and save it. That will make the blocks visible again.


misjka

Great, thx for quick response :)! I'll try that and report any progress later on!

misjka

Worked like a charm, of course ;D. Much obliged!

Any hints about why this error occurrs? Do I dare trying to add any RSS newsfeeds at all...?

Rasyr

I have never tried to add a rss news feed yet, so sorry cannot help you there.

However, I have seen similar things happen, and it is possible that there was maybe an error in the code used, that caused something to be unterminated properly.

Can you post the code you used for the rss here (don't forget to put it in code blocks).


bloc

Its usually the rss feed being formatted in a different way. Next update of TP wil have a "noblocks" option for admin, so you can tack ;noblocks at the end, and simply go into tpadmin and change the block again - as long as you have that on the end of adress. Like index.php?action=tpadmin;noblocks

misjka

Quote from: Rasyr on January 04, 2006, 11:32:55 AM
I have never tried to add a rss news feed yet, so sorry cannot help you there.

However, I have seen similar things happen, and it is possible that there was maybe an error in the code used, that caused something to be unterminated properly.

Can you post the code you used for the rss here (don't forget to put it in code blocks).

What I did was probably all wrong due to noob quality on my knowledge (or lack of it) about php and blocks in TP, but I did the same way as have previously made in MkPortal (which I, btw, have left for TP instead ;)): Just pasted a link to a feed, http://www.simracingworld.com/rss/news.rss, not the xml code itself... Is that the proper way of adding newsfeeds in the TP newsfeed block?

misjka

Quote from: Bloc on January 04, 2006, 11:54:38 AM
Its usually the rss feed being formatted in a different way. Next update of TP wil have a "noblocks" option for admin, so you can tack ;noblocks at the end, and simply go into tpadmin and change the block again - as long as you have that on the end of adress. Like index.php?action=tpadmin;noblocks

Sounds great :)!

IchBin

There is an error in that RSS fee misjka. I did however get it to work on my test site.

http://www.tmrules.com/beta/

Rasyr

Quote from: IchBinâââ,¬Å¾Ã,¢ on January 04, 2006, 01:59:57 PM
There is an error in that RSS fee misjka. I did however get it to work on my test site.

http://www.tmrules.com/beta/

You sure about that? It appears that everything past the RSS block is missing, including the page footer with the copyright notices.. :)

This website is proudly hosted on Crocweb Cloud Website Hosting.