TinyPortal

Development => Support => Topic started by: misjka on January 04, 2006, 09:28:39 AM

Title: Need urgent help as rss screwed my portal/forum up!
Post by: misjka on January 04, 2006, 09:28:39 AM
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...
Title: Re: Need urgent help!
Post by: Rasyr on January 04, 2006, 10:37:38 AM
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.

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.

Title: Re: Need urgent help as rss screwed my portal/forum up!
Post by: misjka on January 04, 2006, 10:54:48 AM
Great, thx for quick response :)! I'll try that and report any progress later on!
Title: Re: Need urgent help as rss screwed my portal/forum up!
Post by: misjka on January 04, 2006, 11:10:14 AM
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...?
Title: Re: Need urgent help as rss screwed my portal/forum up!
Post by: 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).

Title: Re: Need urgent help as rss screwed my portal/forum up!
Post by: 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
Title: Re: Need urgent help as rss screwed my portal/forum up!
Post by: misjka on January 04, 2006, 12:45:47 PM
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?
Title: Re: Need urgent help as rss screwed my portal/forum up!
Post by: misjka on January 04, 2006, 12:48:46 PM
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 :)!
Title: Re: Need urgent help as rss screwed my portal/forum up!
Post by: 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/
Title: Re: Need urgent help as rss screwed my portal/forum up!
Post by: Rasyr on January 04, 2006, 02:02:49 PM
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.. :)
Title: Re: Need urgent help as rss screwed my portal/forum up!
Post by: misjka on January 04, 2006, 02:24:20 PM
Yeah, your site were a little bit better than mine - but not that very much better, I think... Sure you've got the left blocks, but none of the content links or top buttons work - do they?!?
Title: Re: Need urgent help as rss screwed my portal/forum up!
Post by: IchBin on January 04, 2006, 02:56:02 PM
That's because it's a test site. I don't have those links pointing at anything. They're just there as part of the default install and me messing around. I was just showing you that the RSS feed didn't fubar my forum. :)
Title: Re: Need urgent help as rss screwed my portal/forum up!
Post by: misjka on January 04, 2006, 03:14:49 PM
OK... What happens if you turn on that right block column also?

If we (my simracing team and I) wasn't up for an important event tonight (and we therefore need a working forum) I should show you what happens @ my place right away...
Title: Re: Need urgent help as rss screwed my portal/forum up!
Post by: IchBin on January 04, 2006, 03:19:14 PM
Ah yes, now I see some problems. Wasn't looking that hard before. It did disable the right block and made it so I couldn't go back into TPAdmin. Sorry about that. Indeed that RSS feed is FUBAR. :)
Title: Re: Need urgent help as rss screwed my portal/forum up!
Post by: misjka on January 04, 2006, 03:52:27 PM
Phew! Then I'm not the only one  :coolsmiley:... Feels good & bad  :o
Title: Re: Need urgent help as rss screwed my portal/forum up!
Post by: megaman on March 08, 2006, 12:50:57 AM
There is only one thing to say to bloc _ U DA MAN!!!!

Dude, hope you realize that!!!!! I work out here in IBM on the helpdesk, and just wanted to let you know that your Tiny Portal program is awesome!!!!!

Keep up the stellar work my good friend>>>>>> Peace!!!

also ps thanks to ichbin for the rss fix....
Title: Re: Need urgent help as rss screwed my portal/forum up!
Post by: megaman on March 08, 2006, 12:52:12 AM
PS if you want to see what I did with it - check out www.b-o-u-l-d-e-r.com


Laterz, dubs