TinyPortal

Development => Support => Installation => Topic started by: neary on April 01, 2008, 06:09:04 PM

Title: please help!
Post by: neary on April 01, 2008, 06:09:04 PM
I don't know what happen, after i tried to manually intall the TP i got this message:

Parse error: syntax error, unexpected '&' in /home/sopheapn/public_html/Forum/index.php on line 172

www.sopheapneary.com/Forum/index.php

what did i do wrong?
Title: Re: please help!
Post by: Dragooon on April 01, 2008, 06:14:28 PM
Either post lines 333 - 353 here of your index.php or attach the index.php here.
Title: Re: please help!
Post by: neary on April 01, 2008, 06:22:03 PM
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fi188.photobucket.com%2Falbums%2Fz184%2Fsopheapneary%2Fimage002-1.jpg&hash=5dc2864e6118cc9b7fd968c08bdcae5f72747a38)
Title: Re: please help!
Post by: Dragooon on April 01, 2008, 06:25:15 PM
Remove all those   in the file.
Title: Re: please help!
Post by: neary on April 01, 2008, 06:26:53 PM
now i get this: :(

Warning: main(/home/sopheapn/public_html/Forum/Sources/TPortal.php) [function.main]: failed to open stream: No such file or directory in /home/sopheapn/public_html/Forum/index.php on line 57

Fatal error: main() [function.require]: Failed opening required '/home/sopheapn/public_html/Forum/Sources/TPortal.php' (include_path='.:/usr/php4/lib/php:/usr/local/php4/lib/php') in /home/sopheapn/public_html/Forum/index.php on line 57
Title: Re: please help!
Post by: Dragooon on April 01, 2008, 06:29:36 PM
Are you sure that you uploaded all the TPs files?
Title: Re: please help!
Post by: neary on April 01, 2008, 06:33:07 PM
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fi188.photobucket.com%2Falbums%2Fz184%2Fsopheapneary%2Fimage002-2.jpg&hash=5ee712586024c07a05145ec54f5a1e059faeeee2)
Title: Re: please help!
Post by: neary on April 01, 2008, 06:33:29 PM
let me try again, and see what happen.
Title: Re: please help!
Post by: Dragooon on April 01, 2008, 06:35:13 PM
Quote from: Dragooon on April 01, 2008, 06:29:36 PM
Are you sure that you uploaded all the TPs files?
I NEVER asked to post what code you altered, have you UPLOADED TPs file found here (http://www.tinyportal.net/index.php?action=tpmod;dl=item744) according to the instructions?
Title: Re: please help!
Post by: neary on April 01, 2008, 06:36:12 PM
i only did the index.php for now. do i have to do all of them b4 it work?
Title: Re: please help!
Post by: Dragooon on April 01, 2008, 06:41:30 PM
Do each and every step described in here:
http://www.tinyportal.net/index.php?topic=14230.0
Title: Re: please help!
Post by: neary on April 02, 2008, 12:13:04 AM
ok, i did everything like instruction but i still get this Parse error, don't know why?

www.sopheapneary.com/Forum/index.php
Title: Re: please help!
Post by: JPDeni on April 02, 2008, 12:30:47 AM
There's a problem in the Subs.php file. Attach the file to a post and someone will likely be able to find the problem.
Title: Re: please help!
Post by: neary on April 02, 2008, 12:31:40 AM
how do i attach the file here? sorry i'm new
Title: Re: please help!
Post by: Max on April 02, 2008, 01:02:45 AM

click "Additional Options..." browse for the Subs.php file and upload  ;)
Title: Re: please help!
Post by: neary on April 02, 2008, 01:10:48 AM
oh ok, let me try
Title: Re: please help!
Post by: JPDeni on April 02, 2008, 01:50:01 AM
There's a whole series of errors in your file, starting with line 3264. I'm thinking that maybe you didn't use a plain text editor when you manually edited the file. Or something. Be that as it may... :)

Your TinyPortal section looks like this:


// TinyPortal
if (allowedTo(array('tp_settings', 'tp_blocks', 'tp_articles', 'tp_dlmanager', 'tp_gallery', 'tp_linkmanager', 'tp_teampage')))
{
$context['admin_areas']['tportal'] = array(
'title' => 'TinyPortal',
'areas' => array()
);
if (allowedTo('tp_settings')){
$context['admin_areas']['tportal']['areas']['tp_settings'] =&nbsp; '<a href="' . $scripturl . '?action=tpadmin;sa=settings">' . $txt['tp-admin2'] . '</a>';
}
if (allowedTo('tp_blocks')){
$context['admin_areas']['tportal']['areas']['tp_blocks'] =&nbsp; '<a href="' . $scripturl . '?action=tpadmin;sa=blocks">' . $txt['tp-admin5'] . '</a>';
}
if (allowedTo('tp_articles')){
$context['admin_areas']['tportal']['areas']['tp_articles'] =&nbsp; '<a href="' . $scripturl . '?action=tpadmin;sa=articles">' . $txt['tp-admin8'] . '</a>';
}
if (allowedTo('tp_dlmanager') && $context['TPortal']['show_download']){
$context['admin_areas']['tportal']['areas']['tp_dlmanager'] =&nbsp; '<a href="' . $scripturl . '?action=tpmod;dl=admin">' . $txt['tp-admin9'] . '</a>';
}
if (allowedTo('tp_linkmanager') && $context['TPortal']['show_linkmanager']){
$context['admin_areas']['tportal']['areas']['tp_linkmanager'] =&nbsp; '<a href="' . $scripturl . '?action=tpmod;link=admin">' . $txt['tp-admin13'] . '</a>';
}
if (allowedTo('tp_gallery') && $context['TPortal']['show_gallery']){
$context['admin_areas']['tportal']['areas']['tp_gallery'] =&nbsp; '<a href="' . $scripturl . '?action=tpmod;show=admin">' . $txt['tp-admin15'] . '</a>';
}
if (allowedTo('tp_teampage') && $context['TPortal']['show_teampage']){
$context['admin_areas']['tportal']['areas']['tp_teampage'] =&nbsp; '<a href="' . $scripturl . '?action=tpmod;team=admin">' . $txt['tp-admin17'] . '</a>';
}
}
// TinyPortal end


It should look like this:

// TinyPortal
if (allowedTo(array('tp_settings', 'tp_blocks', 'tp_articles', 'tp_dlmanager', 'tp_gallery', 'tp_linkmanager', 'tp_teampage')))
{
$context['admin_areas']['tportal'] = array(
'title' => 'TinyPortal',
'areas' => array()
);
if (allowedTo('tp_settings')){
$context['admin_areas']['tportal']['areas']['tp_settings'] =  '<a href="' . $scripturl . '?action=tpadmin;sa=settings">' . $txt['tp-admin2'] . '</a>';
}
if (allowedTo('tp_blocks')){
$context['admin_areas']['tportal']['areas']['tp_blocks'] =  '<a href="' . $scripturl . '?action=tpadmin;sa=blocks">' . $txt['tp-admin5'] . '</a>';
}
if (allowedTo('tp_articles')){
$context['admin_areas']['tportal']['areas']['tp_articles'] =  '<a href="' . $scripturl . '?action=tpadmin;sa=articles">' . $txt['tp-admin8'] . '</a>';
}
if (allowedTo('tp_dlmanager') && $context['TPortal']['show_download']){
$context['admin_areas']['tportal']['areas']['tp_dlmanager'] =  '<a href="' . $scripturl . '?action=tpmod;dl=admin">' . $txt['tp-admin9'] . '</a>';
}
if (allowedTo('tp_linkmanager') && $context['TPortal']['show_linkmanager']){
$context['admin_areas']['tportal']['areas']['tp_linkmanager'] =  '<a href="' . $scripturl . '?action=tpmod;link=admin">' . $txt['tp-admin13'] . '</a>';
}
if (allowedTo('tp_gallery') && $context['TPortal']['show_gallery']){
$context['admin_areas']['tportal']['areas']['tp_gallery'] =  '<a href="' . $scripturl . '?action=tpmod;show=admin">' . $txt['tp-admin15'] . '</a>';
}
if (allowedTo('tp_teampage') && $context['TPortal']['show_teampage']){
$context['admin_areas']['tportal']['areas']['tp_teampage'] =  '<a href="' . $scripturl . '?action=tpmod;team=admin">' . $txt['tp-admin17'] . '</a>';
}
}
// TinyPortal end


Somehow spaces got translated into


&nbsp;


All of those need to be changed, as I did above. Be sure that you use just a plain text editor to edit your files.
Title: Re: please help!
Post by: Ken. on April 02, 2008, 02:01:00 AM
I had to stop using Microsoft FrontPage on page edits for that very reason... it would add all kinds of extra code to a page which would then end up in my php files if a copy & paste was used to transfer the content of that page. The extra code would always include lots of those pesky "&nbsp;"

Use one of the free editors that are available, like NotePad++ because it can be set to the type of code that you are working on.
Title: Re: please help!
Post by: neary on April 02, 2008, 02:06:35 AM
oh boy! i have to redo it all over again then. I looked at notepad but i don't see any number on there, should i just look for the codes instead then?
Title: Re: please help!
Post by: Smoky on April 02, 2008, 02:22:23 AM
here is the download for notepad++  ;)

http://notepad-plus.sourceforge.net/uk/site.htm

Title: Re: please help!
Post by: JPDeni on April 02, 2008, 03:01:13 AM
Quoteshould i just look for the codes instead then?
Yes. It's better to have a text editor that has numbers, but, since we know what the code is, you can search for it.
Title: Re: please help!
Post by: neary on April 02, 2008, 03:20:14 AM
thank you, i will try to do this codes things 1 more time the right way and see where it'll takes me. thanks for your help and i'll be back.
Title: Re: please help!
Post by: neary on April 02, 2008, 03:59:12 AM
Hi, i'm back. I fixed some of the problem, but now I got this error again and i can't seem the find the mistake.

Parse error: syntax error, unexpected ';' in /home/sopheapn/public_html/Forum/Sources/Load.php on line 669
Title: Re: please help!
Post by: JPDeni on April 02, 2008, 05:38:20 AM
Load.php problems are really hard to find, because the problem usually isn't in that file. It's usually in some other file that got loaded. The only thing you can do is to go over all of your edits again. Slow and tedious process.
Title: Re: please help!
Post by: neary on April 02, 2008, 06:10:26 AM
oh well, i guess i will have to keep on playing with it until i get it right. once again thanks for your help. I  appreciated .
Title: Re: please help!
Post by: JPDeni on April 02, 2008, 06:20:24 AM
No problem. I really hate having to look for those things. Super pain. Best of luck. If we can help, just holler.
Title: Re: please help!
Post by: Dragooon on April 02, 2008, 11:04:11 AM
OK I am attaching a fixed up file.

@JPDeni, It is hard to find Load.php problems when it got eval inside it(Which can be disabled by adding a setting of disableTempEval in settings table), this time there wasn't any eval so it was a problem in the file.
Title: Re: please help!
Post by: JPDeni on April 02, 2008, 01:36:41 PM
Good job, Dragoon! I guess I was sleepy last night. :)
Title: Re: please help!
Post by: Dragooon on April 02, 2008, 01:41:16 PM
Thanks :)