TinyPortal

Development => Support => Installation => Topic started by: RyanA on January 21, 2008, 06:55:15 PM

Title: Mod Question
Post by: RyanA on January 21, 2008, 06:55:15 PM
Link to my site:http://fintonhollow.com/index.php
SMF version:newest
TP version:newest
Theme name and version:Bloc's Black22
Mods installed:

QuoteMod Name     Version     
1.    Custom Profile Field Mod    3.17    [ Uninstall ] [ List Files ] [ Delete ]
2.    WOW Names    1.0.0    [ Uninstall ] [ List Files ] [ Delete ]
3.    TinyPortal    0.983    [ Uninstall ] [ List Files ] [ Delete ]
4.    SMF Shoutbox    1.16b    [ Uninstall ] [ List Files ] [ Delete ]
5.    SMF 1.0.12 / 1.1.4 / 2.0 b1.1 Update    1.0    [ Uninstall ] [ List Files ] [ Delete ]



Related Error messages:

Quoteatal error: Cannot redeclare tpsummary() (previously declared in /home/fintonho/public_html/Sources/Profile.php:2937) in /home/fintonho/public_html/Sources/Profile.php on line 2994


Okay, the original error was generated when trying to look at member profiles and the error was online 3002. I did a search on your site, found that someone had that issue covered and I attempted to use the mods directions as was indicated.

Here is where it falls apart for me: 
I went to Sources/Profile.php as directed in your mod directions and tried to add this: 

Quote// Tinyportal
  'tpsummary' => array(array('profile_view_any', 'profile_view_own'), array('profile_view_any')),
  'tparticles' => array(array('profile_extra_any', 'profile_extra_own'), array('tp_articles')),
  'tpdownload' => array(array('profile_extra_any', 'profile_extra_own'), array('tp_dlmanager')),
  'tpshoutbox' => array(array('profile_extra_any', 'profile_extra_own'), array('tp_blocks')),
  'tpgallery' => array(array('profile_extra_any', 'profile_extra_own'), array('tp_gallery')),
  'tplinks' => array(array('profile_extra_any', 'profile_extra_own'), array('tp_links')),
  // end Tinyportal
\

after this bit:

Quote

'deleteAccount' => array(array('profile_remove_any', 'profile_remove_own'), array('profile_remove_any')),

Trouble is, it seems like it was already there in repetition.  I removed the last set (there were three) and this is the code I have now.



Quote/* Set allowed sub-actions.

  The format of $sa_allowed is as follows:

   $sa_allowed = array(
  'sub-action' => array(permission_array_for_editing_OWN_profile, permission_array_for_editing_ANY_profile[, require_validation]),
  ...
   );

   */

   $sa_allowed = array(
  'summary' => array(array('profile_view_any', 'profile_view_own'), array('profile_view_any')),
  'statPanel' => array(array('profile_view_any', 'profile_view_own'), array('profile_view_any')),
  'showPosts' => array(array('profile_view_any', 'profile_view_own'), array('profile_view_any')),
  'editBuddies' => array(array('profile_extra_any', 'profile_extra_own'), array()),
  'trackUser' => array(array('moderate_forum'), array('moderate_forum')),
  'trackIP' => array(array('moderate_forum'), array('moderate_forum')),
  'showPermissions' => array(array('manage_permissions'), array('manage_permissions')),
  'account' => array(array('manage_membergroups', 'profile_identity_any', 'profile_identity_own'), array('manage_membergroups', 'profile_identity_any')),
  'forumProfile' => array(array('profile_extra_any', 'profile_extra_own'), array('profile_extra_any')),
  'theme' => array(array('profile_extra_any', 'profile_extra_own'), array('profile_extra_any')),
  'notification' => array(array('profile_extra_any', 'profile_extra_own'), array('profile_extra_any')),
  'pmprefs' => array(array('profile_extra_any', 'profile_extra_own'), array('profile_extra_any')),
  'deleteAccount' => array(array('profile_remove_any', 'profile_remove_own'), array('profile_remove_any')),
  // Tinyportal
  'tpsummary' => array(array('profile_view_any', 'profile_view_own'), array('profile_view_any')),
  'tparticles' => array(array('profile_extra_any', 'profile_extra_own'), array('tp_articles')),
  'tpdownload' => array(array('profile_extra_any', 'profile_extra_own'), array('tp_dlmanager')),
  'tpshoutbox' => array(array('profile_extra_any', 'profile_extra_own'), array('tp_blocks')),
  'tpgallery' => array(array('profile_extra_any', 'profile_extra_own'), array('tp_gallery')),
  'tplinks' => array(array('profile_extra_any', 'profile_extra_own'), array('tp_links')),
  // end Tinyportal

I saw that someone else with this problem removed extra text, but there were no specific directions in the mod dealing with is and I don't know how to fix it. Do I remove the whole area between the TinyPortal Tags? I don't want to screw my forum, because believe me, I did it already. I had to reinstall the whole #$%&6@! thing last week when I had a TP installation problem. I want to be very clear. I am trying to carefully follow your directions and not take up anyone's time here, but when things diverge from your directions, I have to ask. Sorry.

So if you or anyone can help. Thanks.
Title: Re: Mod Question
Post by: G6Cad on January 21, 2008, 07:22:52 PM
tp cannot declare a summary indicate that you have duplicate code in your SMF files from one or several mods.
If you read the docsection ( modinstructions) and follow the description for every file, you should be able to see the duplicate codeentries and remove them. That should remove the error.
Title: Re: Mod Question
Post by: RyanA on January 21, 2008, 07:33:29 PM
G6,

I am reading them. And re-reading them. I went to them first and came here absolutely last.

I do not know what this means:

Quotetp cannot declare a summary indicate that you have duplicate code in your SMF files from one or several mods.

The code I posted is what is there in the Source folder where I was directed to add code by the mods. What I see when I get there is that code exists already. I see that in a lot of areas as I attempt to carefully follow your mods. This bit of code I supplied, I can edit, if I know what I am suppose to remove (since I obviously don't need to add as the mod directs).

What do I do if there is code already there? Should any of that be removed? If I come across code that is there as I follow your directions, is something already wrong?

I am willing to do the work, I just need a direction to go in.

Edit: I am using Siteground has my host and they have a C-panel where I am making the edits from...if this is relevant at all.
Title: Re: Mod Question
Post by: G6Cad on January 21, 2008, 07:53:03 PM
What i mean is that you have a lot of doubble added code from one or more mods.
You need to make sure the mods only have ONE set of code and not doubble, the error generate because it find more then one set of the same code in the files.

Simply put, you need to clean out all the doubble code that has been added by the package manager.

The modinstruction show where TP add the code, and WHAT code it adds, you need to make sure the code is there according to the instructions, but only ONE set of the code. If you look at the code in your SMF files, you will find that there are sevral duplicate (doubble) code of TP.

Remove the doubble code so you only have what the instruction show you
Title: Re: Mod Question
Post by: Ken. on January 21, 2008, 08:46:00 PM
Quote from: RyanA on January 21, 2008, 07:33:29 PM
Edit: I am using Siteground has my host and they have a C-panel where I am making the edits from...if this is relevant at all.

IMHO this is not really a good idea... in fact it is so easy to get files mixed up doing edits this way I consider it to be a really bad idea.

Here's a little note that I made some time back on how to do edits for manually installing TinyPortal that can also work for any other edits to forum files.
The note was made to myself as much as it was to others:
QuoteDoing a manual install of TinyPortal is easy to do, you just need to follow the directions found in the Manual Install File Modifications Guide. (http://www.tinyportal.familjegodis.se/index.php?topic=4.0)
Take your time and read carefully as you go and it will work well.


Here's how to safely do file edits:
FileZilla (http://filezilla.sourceforge.net/)
One of the better ftp utilities and it's free.
It's the only one I use.

And you'll need a good editor, here is a nice free one:
Notepad++ (http://notepad-plus.sourceforge.net/uk/site.htm)

Any time you do anything to your forum there is one thing that you should make part of your routine, like:

Backup... Backup... Backup!

When editing a file I generally do this;
Make a temp folder on my desktop...
Open the site with the FileZilla FTP utility...
Download a copy of the file in question and place it in the temp folder...
Then download a fresh copy into my editor and edit away...
Go back to the site and rename the existing online copy of the file to something else, like, old_filename.php...
Then upload the edited version of the file.
When doing several files I wait until all of them have been edited so that they can all be uploaded at the same time.

If everything is OK then I'm finished.
If its all messed up I just delete the bad file that was uploaded, rename the good one to the correct file name and the forum is back to normal.
Title: Re: Mod Question
Post by: RyanA on January 22, 2008, 02:32:48 AM
Thanks for the help. Ken, your directions are a huge help. I thought it was okay to just go into the files in my CP, and edit and it makes me break into a cold sweat every time.

That's the one thing I think the support staff here might be overlooking. Many of us are absolute novices. It's not your fault, of course. But most of us can run SMF without really going into all this sort of editing. It's TP that brings us into this confusing programing world and absolutely foreign terms. I really want TP to work. I like the look of it. But I confess, I am overwhelmed. I haven't given up because...well, there's a pride thing involved in it now.

I will mark the topic solved when I finally get this right. So bear with me....

Okay, I downloaded Filezilla. I went to the Notepad++, but I don't know which thing to use. Is it Binary or Source files that I want? Those are the two options.


Title: Re: Mod Question
Post by: Ken. on January 22, 2008, 02:59:34 AM
It just takes a little time and effort to start learning this stuff and you don't have to end up being a true coder to do good work in your forum... personally I'm not even close to being one but can get to where I want to be by following the tips and code given by those who are coders.

The first thing to know is that you should not go thrashing around in files based on guess work, read very carefully what the file edit guide lines are telling you to do.

A very good case in point is the TinyPortal Manual Install Instructions (http://www.tinyportal.net/index.php?topic=14230), if you carefully read through and follow those steps you'll end up with your TP file edits just exactly correct and you'll learn a lot about how this all works together in the process.

As for the issue you first posted... The link above will take you to our docs section here, but as noted by G6 you may have duplicate code from some other mod and may need to do the same for one or all of them. For those other mods you will need to post the question to the person who wrote the mod.

An alternative method would be to use the Package Parser (http://www.smfhacks.com/smf-package-parser.html) which will give you a listing of the file edits for most mods when you run one through the P/P.
Title: Re: Mod Question
Post by: RyanA on January 22, 2008, 04:22:23 PM
Ken,
Thanks for the response. And believe me, the last thing I want to be doing is thrashing about anywhere.

I did bring in Filezilla, but when I want to your Notepad++ link, it has two downloads. I don't know which to download. It is binary or souce. Those are the two download options.

But on a shifting direction, I think my best bet is to delete the entire install as well as all my mods and just do the manual install. Maybe that would help me see the process better.

I feel like I am trying to work backwards by going in and trying to look at this mud of code that makes no sense to me. I used the package manager to uninstall TP, but it still appears in the Admin section and seems to be affecting the shoutbox that I have installed. I want to remove everything and reinstall, but if those files are still there, it's only going to make a bigger mess.

The doc on TP for Uninstalling says to use the package manager and if doesn't work, remove the code strings. That seems very simple, except I don't know what code strings and where to find them.

Can/should I remove these?:

Quote/home/fintonho/public_html/Sources/TPdlmanager.php ,
/home/fintonho/public_html/Sources/TPgallery.php ,
/home/fintonho/public_html/Sources/TPhelp.php ,
/home/fintonho/public_html/Sources/TPlinkmanager.php ,
/home/fintonho/public_html/Sources/TPmodules.php ,
/home/fintonho/public_html/Sources/TPortal.php ,
/home/fintonho/public_html/Sources/TPortalAdmin.php ,
/home/fintonho/public_html/Sources/TPteampage.php ,

Title: Re: Mod Question
Post by: Dragooon on January 22, 2008, 04:36:26 PM
No Don't,
May I know how did you installed it?

It means that a function is re-declared, see the end of Profile.php and see if the same tp function is declared 2 or more times.

If it is, remove the duplicates.
Title: Re: Mod Question
Post by: RyanA on January 22, 2008, 04:45:09 PM
I used the package manager and it went without a hitch. Everything looked perfect, but then I could not access anyone's profile. Members could not access them either to use the PM system. I could not clear members.

I did try to follow the mod to solve the problem, but I found triple sets of code where the mod said to add code. I got lost. I wasn't sure whether to add more code, or to delete.

I am been seeking help on another forum as well. A programmer who is using SMF/TP had this to say:

QuoteHonestly, running and modding an extensible forum for SMF isn't for beginners. You have to be very careful with the directions and know how to edit a PHP file.

He loves both SMF and TP. But he is right. I understand the basics of SMF as I ran an SMFforFree forum for quite some time. I have no idea how to edit PHP and I don't even understand much of the terminology.

If I delete and reinstall manually, maybe I will understand how things tie together better.

Hope I am making sense here.

I don't know how to get rid of the code strings. Can you point me to the file/ files. Is it doing the mod directions backward somehow?
Title: Re: Mod Question
Post by: G6Cad on January 22, 2008, 04:47:36 PM
This is getting nowhere.

Do this now.

Download and replace ALL of the SMF files with new ones from the install package from simplemachines.org.

extract the package to your local machine and remove the settings.php and the settings_bak.php from the files.

Upload OVERWRITE all your existing files you have through FTP.

That will give you all fresh SMF files and when you have come that far, install TP first through your package manager with the forum set to use Default SMF Core theme and english language ( not utf )

Now you refresh your forum and TP will probably be ok now.
Next step for you is to add the other mods you have and want, start with the next biggest one and then the next until you have the things you want installed.

Now you can set your forum to use the theme you want, make sure it's a TP theme or else you will not be able to see TP again.
Title: Re: Mod Question
Post by: RyanA on January 22, 2008, 05:19:35 PM
G6,
I will do this if it doesn't mean I lose my forum content.
Title: Re: Mod Question
Post by: G6Cad on January 22, 2008, 05:24:35 PM
No, all of the forum content are saved in the database, you just replace the files ( thats why i wrote yopu remove the settings.php and settings_bak.php before you upload the files. You need to leave these files alone on the server as all your settings are stored in there)
Title: Re: Mod Question
Post by: RyanA on January 22, 2008, 10:41:20 PM
I had no freaking idea how to reinstall the files and such. I did try to learn for a couple hours. I used Fantastico to install them at Siteground. I decided to work your Mod Instructions backwards to remove all the TP stuff. It took awhile but it seems like it worked. I am having one error with the an old shoutbox mod that seems to still be lurking somewhere. I get a Sources/Load/Php error about line 1137 and an error in the Babylon theme. Maybe it's unrelated. Hell, if I know.

Anyway, mark the this topic as solved so it doesn't linger on here.

Title: Re: Mod Question
Post by: G6Cad on January 22, 2008, 10:52:33 PM
Just noticed something in your first post that i didnt see before.

This line here
Quote5.    SMF 1.0.12 / 1.1.4 / 2.0 b1.1 Update

Are you running SMF 2 beta ? 
Title: Re: Mod Question
Post by: Dragooon on January 23, 2008, 03:27:15 PM
Actually it is a common upgrade for 1.0.12/1.1.4/2.0 Beta 1.1 so I don't think so he will be.