TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 790
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online

Mod Question

Started by RyanA, January 21, 2008, 06:55:15 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

RyanA

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.

G6Cad

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.

RyanA

#2
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.

G6Cad

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

Ken.

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.
Take your time and read carefully as you go and it will work well.


Here's how to safely do file edits:
FileZilla
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++

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.
" If everything seems under control, you're not going fast enough." - Mario Andretti
Yesterday When I was Young.

RyanA

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.



Ken.

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, 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 which will give you a listing of the file edits for most mods when you run one through the P/P.
" If everything seems under control, you're not going fast enough." - Mario Andretti
Yesterday When I was Young.

RyanA

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 ,


Dragooon

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.

RyanA

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?

This website is proudly hosted on Crocweb Cloud Website Hosting.