Current:
SMF 2.1.4 TP 3
Migrating and Upgraded from SMF 2.0.19/TP 1 to current. Error log getting a lot of errors when am trying to modify panels and blocks.
QuoteToday at 20:27:19
Mitchell Baker
50.104.3.143
4491c5fd5b9710f70cce35f2ec571fbb
https://usscalemasters.net/forumsmf2/index.php?action=tpadmin&sa=editblock&id=34;d27e9647c=4491c5fd5b9710f70cce35f2ec571fbb
/home/usscalem/public_html/forumsmf2/Themes/default/TPBlockLayout.template.php (Line 652) Backtrace information
Type of error: Undefined
Error messageSelect
8: Undefined index: panelstyle
70
Today at 20:27:19
Mitchell Baker
50.104.3.143
4491c5fd5b9710f70cce35f2ec571fbb
https://usscalemasters.net/forumsmf2/index.php?action=tpadmin&sa=editblock&id=34;d27e9647c=4491c5fd5b9710f70cce35f2ec571fbb
/home/usscalem/public_html/forumsmf2/Themes/default/TPBlockLayout.template.php (Line 643) Backtrace information
Type of error: Undefined
Error messageSelect
8: Undefined index: panelstyle
69
Today at 20:27:04
Mitchell Baker
50.104.3.143
4491c5fd5b9710f70cce35f2ec571fbb
https://usscalemasters.net/forumsmf2/index.php?
/home/usscalem/public_html/forumsmf2/Themes/default/TPsubs.template.php(601) : eval()'d code (Line 99) Backtrace information
Type of error: General
Error messageSelect
2: sizeof(): Parameter must be an array or an object that implements Countable
68
Today at 20:27:04
Mitchell Baker
50.104.3.143
4491c5fd5b9710f70cce35f2ec571fbb
https://usscalemasters.net/forumsmf2/index.php?
/home/usscalem/public_html/forumsmf2/Themes/default/TPsubs.template.php(601) : eval()'d code (Line 99) Backtrace information
Type of error: General
Error messageSelect
8: Trying to access array offset on value of type null
67
Today at 20:27:04
Mitchell Baker
50.104.3.143
4491c5fd5b9710f70cce35f2ec571fbb
https://usscalemasters.net/forumsmf2/index.php?
/home/usscalem/public_html/forumsmf2/Themes/default/TPsubs.template.php(601) : eval()'d code (Line 99) Backtrace information
Type of error: Undefined
Error messageSelect
8: Undefined index: tpmodules
66
Today at 20:27:04
Mitchell Baker
50.104.3.143
4491c5fd5b9710f70cce35f2ec571fbb
https://usscalemasters.net/forumsmf2/index.php?
/home/usscalem/public_html/forumsmf2/Themes/default/TPsubs.template.php(601) : eval()'d code (Line 51) Backtrace information
Type of error: General
Error messageSelect
2: implode(): Invalid arguments passed
65
Today at 20:27:04
Mitchell Baker
50.104.3.143
4491c5fd5b9710f70cce35f2ec571fbb
https://usscalemasters.net/forumsmf2/index.php?
/home/usscalem/public_html/forumsmf2/Themes/default/TPsubs.template.php(601) : eval()'d code (Line 51) Backtrace information
Type of error: Undefined
Error messageSelect
8: Undefined index: fader_news_lines
64
Today at 20:27:04
Mitchell Baker
50.104.3.143
4491c5fd5b9710f70cce35f2ec571fbb
https://usscalemasters.net/forumsmf2/index.php?
/home/usscalem/public_html/forumsmf2/Sources/TPortal.php (Line 1956) Backtrace information
Type of error: Undefined
Error messageSelect
8: Undefined index: block_author
63
Today at 20:27:04
Mitchell Baker
50.104.3.143
4491c5fd5b9710f70cce35f2ec571fbb
https://usscalemasters.net/forumsmf2/index.php?
/home/usscalem/public_html/forumsmf2/Sources/TPortal.php (Line 1955) Backtrace information
Type of error: Undefined
Error messageSelect
8: Undefined index: block_height
62
Today at 20:27:04
Mitchell Baker
50.104.3.143
4491c5fd5b9710f70cce35f2ec571fbb
https://usscalemasters.net/forumsmf2/index.php?
/home/usscalem/public_html/forumsmf2/Themes/default/TPsubs.template.php(601) : eval()'d code (Line 21) Backtrace information
Type of error: General
Error messageSelect
8: Trying to access array offset on value of type null
61
Today at 20:27:04
Mitchell Baker
50.104.3.143
4491c5fd5b9710f70cce35f2ec571fbb
https://usscalemasters.net/forumsmf2/index.php?
/home/usscalem/public_html/forumsmf2/Themes/default/TPsubs.template.php(601) : eval()'d code (Line 21) Backtrace information
Type of error: Undefined
Error messageSelect
8: Undefined variable: settings
60
Today at 20:27:04
Mitchell Baker
50.104.3.143
4491c5fd5b9710f70cce35f2ec571fbb
https://usscalemasters.net/forumsmf2/index.php?
/home/usscalem/public_html/forumsmf2/Themes/default/TPsubs.template.php(601) : eval()'d code (Line 21) Backtrace information
Type of error: General
Error messageSelect
8: Trying to access array offset on value of type null
59
Today at 20:27:04
Mitchell Baker
50.104.3.143
4491c5fd5b9710f70cce35f2ec571fbb
https://usscalemasters.net/forumsmf2/index.php?
/home/usscalem/public_html/forumsmf2/Themes/default/TPsubs.template.php(601) : eval()'d code (Line 21) Backtrace information
Type of error: Undefined
Error messageSelect
8: Undefined variable: settings
58
Today at 20:27:04
Mitchell Baker
50.104.3.143
4491c5fd5b9710f70cce35f2ec571fbb
https://usscalemasters.net/forumsmf2/index.php?
/home/usscalem/public_html/forumsmf2/Themes/default/TPsubs.template.php(601) : eval()'d code (Line 21) Backtrace information
Type of error: General
Error messageSelect
8: Trying to access array offset on value of type null
57
Today at 20:27:04
Mitchell Baker
50.104.3.143
4491c5fd5b9710f70cce35f2ec571fbb
https://usscalemasters.net/forumsmf2/index.php?
/home/usscalem/public_html/forumsmf2/Themes/default/TPsubs.template.php(601) : eval()'d code (Line 21) Backtrace information
Type of error: Undefined
Error messageSelect
8: Undefined variable: settings
Not sure what is going on.
Any help greatly appreciated. Let me know if more info is needed.
Thanks
Mitch
What steps did you follow to carry out the upgrade?
Also, what other mods do you have installed? And what backups were made of the 2.0.19 site prior to conversion?
Pretty much followed these steps:
https://wiki.simplemachines.org/smf/How_do_I_move_my_SMF_board_to_a_different_host (https://wiki.simplemachines.org/smf/How_do_I_move_my_SMF_board_to_a_different_host)
Some of it was difficult, Package Manager was a mess, and told me most everything was not even installed. But I did follow the step to upload a fresh step of files:
https://wiki.simplemachines.org/smf/How_to_upload_a_fresh_set_of_files (https://wiki.simplemachines.org/smf/How_to_upload_a_fresh_set_of_files)
Most everything went smooth, but now I am running into a few issues after the install of TP 3. It didn't give any errors during the install. But now running across a few issues like this and my other post:
https://www.tinyportal.net/index.php?topic=36938.0 (https://www.tinyportal.net/index.php?topic=36938.0)
Thanks
Mitch
Current Mods
SMF Downloads Directory 1.3
SMFPacks Multimedia Gallery 2.0.4
TinyPortal 3.0.0
SMFPacks: SEO Pro Mod 2.4.8
Pretty much have several different backups and the original site is still up and running.
Using the default SMF theme
Thanks
Mitch
What backups were made of the 2.0.19 site prior to conversion?
Original site
Current production site usscalemasters.org (https://www.usscalemasters.org/forumsmf2/)
New migrated site:
https://usscalemasters.net/forumsmf2/ (https://usscalemasters.net/forumsmf2/)
OK, so it looks like your original site is still active and the errors are occurring on a test site.
My suggestion would as follows:
- Wipe the current test site and start again.
- Install a fresh copy of 2.0.19 in the test space (no mods) and import the database.
- Run repair_settings.php and make sure the forum all works correctly without errors
- Make a backup of this test site - files and database
- Run the 2.1.4 major upgrade package on this test site
- Make sure it all works correctly
- Make a backup of the converted 2.1.4 database
- Now install your mods one by one and check for errors after installing each one
- If you get problems at any stage, sort out the problems before going to the next step.
- Make backups after every successful step so you can roll back if needed.
- When you finally get the test site all working properly, use that database to build your production site.
- To build your production site...
- Install a fresh copy of 2.1.4
- Import your 2.1.4 database and run repair_settings.php
- Make sure SMF is working properly before proceeding
- Install your mods one by one and check for errors at each step.
- Make backups after every successful step so you can roll back if needed.
- Finally you will have a good, error free production site.
The idea is to work in small measured steps and discover all the little issues in a controlled environment. Then you can roll back at any stage, get it right before proceeding to the next step.
I'll give it a shot.. One more time.. with feeling LOL
Thanks
Mitch
Thanks for the help davo88.
I am up to the point of testing the upgrade to 2.1.4 and have an error showing in the error log:
QuoteError
Type of error
Cron
Error message
8: Trying to access array offset on value of type null
File
/home/usscalem/public_html/forumsmf2/Sources/Subs-Db-mysql.php
Line
590
URL of page causing the error
https://usscalemasters.net/forumsmf2/index.phphttps://usscalemasters.net/forumsmf2/cron.php
Backtrace information
#0: smf_error_handler_cron()
Called from /home/usscalem/public_html/forumsmf2/Sources/Subs-Db-mysql.php on line 590
#1: smf_db_error()
Called from /home/usscalem/public_html/forumsmf2/Sources/Subs-Db-mysql.php on line 494
#2: smf_db_query()
Called from /home/usscalem/public_html/forumsmf2/Sources/Subs-Db-mysql.php on line 802
#3: smf_db_insert()
Called from /home/usscalem/public_html/forumsmf2/Sources/Subs.php on line 529
#4: updateSettings()
Called from /home/usscalem/public_html/forumsmf2/Sources/Subs.php on line 7484
#5: set_tld_regex()
Called from /home/usscalem/public_html/forumsmf2/Sources/tasks/UpdateTldRegex.php on line 31
#6: execute()
Called from /home/usscalem/public_html/forumsmf2/cron.php on line 249
#7: perform_task()
Called from /home/usscalem/public_html/forumsmf2/cron.php on line 131
I ran into this the first time but now can't remember how I fixed this one.
Can you point me where to look? I know this is kinda out of scope from this forum.
Thanks
Mitch
You are right, the upgrade of SMF is not really in our scope. Just checking your earlier error messages and putting these in perspective: I believe these may very well have been related to custom blocks you had in your forum.
Once you get the upgrade done and TP v300 up and running I recommend you deactivate all the custom blocks and activate them one by one, checking the forum and error after each block activation... I think you will find the suspect blocks quite quickly then...
Yes, I think it best to repost this question in the SMF 2.1 support forum. Suggest you set out very clearly the exact steps you have followed prior to getting this error. Also include details of the database, PHP version and perhaps attach a PHP Info report.
Well, started over again.. 5th time's the charm? LOL..
Anyway, I'm back to the working 2.0.19 clean install with DB imported from the production site.
usscalemasters.net upgrade test site. (https://usscalemasters.net/forumsmf2/index.php)
The current production
U.S. Scale Masters (https://www.usscalemasters.org/forumsmf2/index.php)
I can log in, members show up data is there. So I'm about to take DB backup and tar up the forum files and run the 2.1.4 upgrade. Seem the production site was in worse shape than I realized. Even though the form said it was 2.0.19, the DB said 2.0.2 and the files, well they are all over the place. So after I did the 2.0.19 scratch site, imported the DB ran the 2.0.19 upgrade and seemed to fix the DB. I'll update status after the 2.1.4 and TP 3 upgrade and install if all goes well.
Thanks
Mitch
Suggest to take your time after 2.1.4 upgrade and be sure everything is absolutely 100% before adding TP3.0 or any other mods. I found little problems in 2.1.4 can cause big upsets with mods, including TP.
Thanks, so far so good. I got the cron.php I reported earlier once, but has not cropped up again since I ran repair_settings.php. So not sure about. I'll do a good look around, do some test posts as different type users. Can you elaborate on what you ran across?
If all looks good, what would you suggest with TP?
Install it, then copy the files that go in tp_download, tp_files and tm_images? Or copy them over first, then install TP? and yes I am doing DB exports and tar of all the forum files between each step.
I know after TP is on, I am going to have to disable anything with block code and go about resetting all of those.
Thanks again for all the help
Later
Mitch
Quote from: GhostRider2110 on June 18, 2024, 03:04:02 AMdo some test posts as different type users.
Good idea. Logging in as different membergroups is really important. If you can get some other forum members to try things out too, it's even better. They will find stuff that you miss.
Quote from: GhostRider2110 on June 18, 2024, 03:04:02 AMCan you elaborate on what you ran across?
So many little things. But an example with TP. My forum uses an old set of smileys (phpBB, 2004) and takes a bit of fiddling to get them to display. I hadn't done that prior to my first install of TP and the display went a bit haywire. @rjen figured it out and put me on the right track. I mention that as an example of how a small, unexpected thing can cause major problems. So best not to think "I'll sort that out later.." but to get everything right at each step.
Also check all the attachments and avatars are working correctly. Check all the database tables are using utf8mb3_general_ci. See - https://www.simplemachines.org/community/index.php?msg=4175715. Check the default database collation is also utf8mb3_general_ci. My database still had the old latin1_swedish as default (the 2.1.4 conversion changed all the tables but not the default). So when I installed a mod from vbgamer, it used the old default.
There were many, many such small hiccups and I probably have notes on them all, but a bit short of time this week to go through them.
Quote from: GhostRider2110 on June 18, 2024, 03:04:02 AMIf all looks good, what would you suggest with TP?
Install it, then copy the files that go in tp_download, tp_files and tm_images? Or copy them over first, then install TP?
Again @rjen put me on the right track here see - https://www.tinyportal.net/index.php?msg=304268
Thanks, no prob, I understand, I'm trying to get this done along with my normal real world work load. I'm a 30+ year Unix/Linux systems admin and currently support State of Indiana, Legislative Services Agency and the developers there. That's kind of why the couple of forums I run are in such bad shape.
I'll look over those threads. Once I get back into it, brushing back up on my php, Mysql and such things should be a little easier to troubleshoot.
I do appreciate the help!!
Later
Mitch
Well, made it to SMF 2.1.4 TP 3.
Attachments and Avatars caused a little problem, but thanks davo88 and @rjen. The info you posted helped me a great deal.
I cloned the working 2.1.4 to new site. Imported DB and made sure all was still working properly with the cloned site. All went well.
Installed TP 3.0 That went as expected. I then copied the original files for tp-images, tp-download and tp-files. That also seems to have gone well. Cleaned up or got rid of some old block code. More errors stopped.
EDIT: I have figure out the error is logged when I click on any block within a panel. Left/right/top/bottom/etc. Does not really seem to matter. One of them is as simple as a ling to a html page. It does display but the same error is logged.
Currently have same two sets of errors popping up.
Quote| Type of error |
| General |
| Error message |
2: Trying to access array offset on value of type null |
| File |
| /home/usscalem/domains/tp3.usscalemasters.net/public_html/forumsmf2/Themes/default/TPsubs.template.php(601) : eval()'d code |
| Line |
| 99 |
| URL of page causing the error |
| https://tp3.usscalemasters.net/forumsmf2/index.php?https://tp3.usscalemasters.net/forumsmf2/ |
Backtrace information
- #0: smf_error_handler()
Called from /home/usscalem/domains/tp3.usscalemasters.net/public_html/forumsmf2/Themes/default/TPsubs.template.php(601) : eval()'d code on line 99 (https://tp3.usscalemasters.net/forumsmf2/index.php?action=admin;area=logs;sa=errorlog;file=L2hvbWUvdXNzY2FsZW0vZG9tYWlucy90cDMudXNzY2FsZW1hc3RlcnMubmV0L3B1YmxpY19odG1sL2ZvcnVtc21mMi9UaGVtZXMvZGVmYXVsdC9UUHN1YnMudGVtcGxhdGUucGhwKDYwMSkgOiBldmFsKCknZCBjb2Rl;line=99) - #1: eval()
Called from /home/usscalem/domains/tp3.usscalemasters.net/public_html/forumsmf2/Themes/default/TPsubs.template.php on line 601 (https://tp3.usscalemasters.net/forumsmf2/index.php?action=admin;area=logs;sa=errorlog;file=L2hvbWUvdXNzY2FsZW0vZG9tYWlucy90cDMudXNzY2FsZW1hc3RlcnMubmV0L3B1YmxpY19odG1sL2ZvcnVtc21mMi9UaGVtZXMvZGVmYXVsdC9UUHN1YnMudGVtcGxhdGUucGhw;line=601) - #2: TPortal_phpbox()
Called from /home/usscalem/domains/tp3.usscalemasters.net/public_html/forumsmf2/Themes/default/TPsubs.template.php on line 129 (https://tp3.usscalemasters.net/forumsmf2/index.php?action=admin;area=logs;sa=errorlog;file=L2hvbWUvdXNzY2FsZW0vZG9tYWlucy90cDMudXNzY2FsZW1hc3RlcnMubmV0L3B1YmxpY19odG1sL2ZvcnVtc21mMi9UaGVtZXMvZGVmYXVsdC9UUHN1YnMudGVtcGxhdGUucGhw;line=129) - #3: TPblock()
Called from /home/usscalem/domains/tp3.usscalemasters.net/public_html/forumsmf2/Sources/TPortal.php on line 2034 (https://tp3.usscalemasters.net/forumsmf2/index.php?action=admin;area=logs;sa=errorlog;file=L2hvbWUvdXNzY2FsZW0vZG9tYWlucy90cDMudXNzY2FsZW1hc3RlcnMubmV0L3B1YmxpY19odG1sL2ZvcnVtc21mMi9Tb3VyY2VzL1RQb3J0YWwucGhw;line=2034) - #4: TPortal_panel()
Called from /home/usscalem/domains/tp3.usscalemasters.net/public_html/forumsmf2/Themes/default/TPBlockLayout.template.php on line 120 (https://tp3.usscalemasters.net/forumsmf2/index.php?action=admin;area=logs;sa=errorlog;file=L2hvbWUvdXNzY2FsZW0vZG9tYWlucy90cDMudXNzY2FsZW1hc3RlcnMubmV0L3B1YmxpY19odG1sL2ZvcnVtc21mMi9UaGVtZXMvZGVmYXVsdC9UUEJsb2NrTGF5b3V0LnRlbXBsYXRlLnBocA==;line=120) - #5: template_tp_below()
Called from /home/usscalem/domains/tp3.usscalemasters.net/public_html/forumsmf2/Sources/Load.php on line 2778 (https://tp3.usscalemasters.net/forumsmf2/index.php?action=admin;area=logs;sa=errorlog;file=L2hvbWUvdXNzY2FsZW0vZG9tYWlucy90cDMudXNzY2FsZW1hc3RlcnMubmV0L3B1YmxpY19odG1sL2ZvcnVtc21mMi9Tb3VyY2VzL0xvYWQucGhw;line=2778) - #6: loadSubTemplate()
Called from /home/usscalem/domains/tp3.usscalemasters.net/public_html/forumsmf2/Sources/Subs.php on line 4683 (https://tp3.usscalemasters.net/forumsmf2/index.php?action=admin;area=logs;sa=errorlog;file=L2hvbWUvdXNzY2FsZW0vZG9tYWlucy90cDMudXNzY2FsZW1hc3RlcnMubmV0L3B1YmxpY19odG1sL2ZvcnVtc21mMi9Tb3VyY2VzL1N1YnMucGhw;line=4683) - #7: template_footer()
Called from /home/usscalem/domains/tp3.usscalemasters.net/public_html/forumsmf2/Sources/Subs.php on line 4172 (https://tp3.usscalemasters.net/forumsmf2/index.php?action=admin;area=logs;sa=errorlog;file=L2hvbWUvdXNzY2FsZW0vZG9tYWlucy90cDMudXNzY2FsZW1hc3RlcnMubmV0L3B1YmxpY19odG1sL2ZvcnVtc21mMi9Tb3VyY2VzL1N1YnMucGhw;line=4172) - #8: obExit()
Called from /home/usscalem/domains/tp3.usscalemasters.net/public_html/forumsmf2/index.php on line 187 (https://tp3.usscalemasters.net/forumsmf2/index.php?action=admin;area=logs;sa=errorlog;file=L2hvbWUvdXNzY2FsZW0vZG9tYWlucy90cDMudXNzY2FsZW1hc3RlcnMubmV0L3B1YmxpY19odG1sL2ZvcnVtc21mMi9pbmRleC5waHA=;line=187)
and
QuoteError
| Type of error |
| Undefined_vars |
| Error message |
2: Undefined array key "tpmodules" |
| File |
| /home/usscalem/domains/tp3.usscalemasters.net/public_html/forumsmf2/Themes/default/TPsubs.template.php(601) : eval()'d code |
| Line |
| 99 |
| URL of page causing the error |
| https://tp3.usscalemasters.net/forumsmf2/index.php?https://tp3.usscalemasters.net/forumsmf2/ |
Backtrace information
- #0: smf_error_handler()
Called from /home/usscalem/domains/tp3.usscalemasters.net/public_html/forumsmf2/Themes/default/TPsubs.template.php(601) : eval()'d code on line 99 (https://tp3.usscalemasters.net/forumsmf2/index.php?action=admin;area=logs;sa=errorlog;file=L2hvbWUvdXNzY2FsZW0vZG9tYWlucy90cDMudXNzY2FsZW1hc3RlcnMubmV0L3B1YmxpY19odG1sL2ZvcnVtc21mMi9UaGVtZXMvZGVmYXVsdC9UUHN1YnMudGVtcGxhdGUucGhwKDYwMSkgOiBldmFsKCknZCBjb2Rl;line=99) - #1: eval()
Called from /home/usscalem/domains/tp3.usscalemasters.net/public_html/forumsmf2/Themes/default/TPsubs.template.php on line 601 (https://tp3.usscalemasters.net/forumsmf2/index.php?action=admin;area=logs;sa=errorlog;file=L2hvbWUvdXNzY2FsZW0vZG9tYWlucy90cDMudXNzY2FsZW1hc3RlcnMubmV0L3B1YmxpY19odG1sL2ZvcnVtc21mMi9UaGVtZXMvZGVmYXVsdC9UUHN1YnMudGVtcGxhdGUucGhw;line=601) - #2: TPortal_phpbox()
Called from /home/usscalem/domains/tp3.usscalemasters.net/public_html/forumsmf2/Themes/default/TPsubs.template.php on line 129 (https://tp3.usscalemasters.net/forumsmf2/index.php?action=admin;area=logs;sa=errorlog;file=L2hvbWUvdXNzY2FsZW0vZG9tYWlucy90cDMudXNzY2FsZW1hc3RlcnMubmV0L3B1YmxpY19odG1sL2ZvcnVtc21mMi9UaGVtZXMvZGVmYXVsdC9UUHN1YnMudGVtcGxhdGUucGhw;line=129) - #3: TPblock()
Called from /home/usscalem/domains/tp3.usscalemasters.net/public_html/forumsmf2/Sources/TPortal.php on line 2034 (https://tp3.usscalemasters.net/forumsmf2/index.php?action=admin;area=logs;sa=errorlog;file=L2hvbWUvdXNzY2FsZW0vZG9tYWlucy90cDMudXNzY2FsZW1hc3RlcnMubmV0L3B1YmxpY19odG1sL2ZvcnVtc21mMi9Tb3VyY2VzL1RQb3J0YWwucGhw;line=2034) - #4: TPortal_panel()
Called from /home/usscalem/domains/tp3.usscalemasters.net/public_html/forumsmf2/Themes/default/TPBlockLayout.template.php on line 120 (https://tp3.usscalemasters.net/forumsmf2/index.php?action=admin;area=logs;sa=errorlog;file=L2hvbWUvdXNzY2FsZW0vZG9tYWlucy90cDMudXNzY2FsZW1hc3RlcnMubmV0L3B1YmxpY19odG1sL2ZvcnVtc21mMi9UaGVtZXMvZGVmYXVsdC9UUEJsb2NrTGF5b3V0LnRlbXBsYXRlLnBocA==;line=120) - #5: template_tp_below()
Called from /home/usscalem/domains/tp3.usscalemasters.net/public_html/forumsmf2/Sources/Load.php on line 2778 (https://tp3.usscalemasters.net/forumsmf2/index.php?action=admin;area=logs;sa=errorlog;file=L2hvbWUvdXNzY2FsZW0vZG9tYWlucy90cDMudXNzY2FsZW1hc3RlcnMubmV0L3B1YmxpY19odG1sL2ZvcnVtc21mMi9Tb3VyY2VzL0xvYWQucGhw;line=2778) - #6: loadSubTemplate()
Called from /home/usscalem/domains/tp3.usscalemasters.net/public_html/forumsmf2/Sources/Subs.php on line 4683 (https://tp3.usscalemasters.net/forumsmf2/index.php?action=admin;area=logs;sa=errorlog;file=L2hvbWUvdXNzY2FsZW0vZG9tYWlucy90cDMudXNzY2FsZW1hc3RlcnMubmV0L3B1YmxpY19odG1sL2ZvcnVtc21mMi9Tb3VyY2VzL1N1YnMucGhw;line=4683) - #7: template_footer()
Called from /home/usscalem/domains/tp3.usscalemasters.net/public_html/forumsmf2/Sources/Subs.php on line 4172 (https://tp3.usscalemasters.net/forumsmf2/index.php?action=admin;area=logs;sa=errorlog;file=L2hvbWUvdXNzY2FsZW0vZG9tYWlucy90cDMudXNzY2FsZW1hc3RlcnMubmV0L3B1YmxpY19odG1sL2ZvcnVtc21mMi9Tb3VyY2VzL1N1YnMucGhw;line=4172) - #8: obExit()
Called from /home/usscalem/domains/tp3.usscalemasters.net/public_html/forumsmf2/index.php on line 187 (https://tp3.usscalemasters.net/forumsmf2/index.php?action=admin;area=logs;sa=errorlog;file=L2hvbWUvdXNzY2FsZW0vZG9tYWlucy90cDMudXNzY2FsZW1hc3RlcnMubmV0L3B1YmxpY19odG1sL2ZvcnVtc21mMi9pbmRleC5waHA=;line=187)
Any ideas?
Thanks
Mitch
QuoteI cloned the working 2.1.4 to new site. Imported DB and made sure all was still working properly with the cloned site. All went well.
So here you have a working, error free 2.1.4 only installation.
QuoteInstalled TP 3.0 That went as expected. I then copied the original files for tp-images, tp-download and tp-files. That also seems to have gone well.
Then the TP installation process worked without errors.
QuoteCleaned up or got rid of some old block code. More errors stopped.
But you get errors when viewing the site. Have you tried disabling all panels and blocks and then methodically enabling them one by one?
I am pretty sure that the errors you mentioned are caused by one or two (custom) blocks...
Is it enough to disable all blocks in a panel? Or will I have delete all the blocks? I think most that are left active are just linking to pages or articles. I will keep looking.
Thanks
Mitch
I believe I found it. Stats and info block I had, must be old code:
global $context, $settings, $options, $scripturl, $txt, $modSettings;
$bullet = '<img src="Themes/default/images/tinyportal/TPdivider.png" style="margin-right: 5px; margin-left: 5px" />';
echo'
<div class="tp_userblock">';
// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
<h4>', $txt['hello_member'], ' ', $context['user']['name'], '</h4>
';
// Only tell them about their messages if they can read their messages!
if ($context['allow_pm']){
echo '
' , $bullet , '<a href="', $scripturl, '?action=pm">' .$txt['tp-pm'].' ', $context['user']['messages'], '</a>';
if($context['user']['unread_messages']>0)
echo '
' , $bullet , '<a href="', $scripturl, '?action=pm">' .$txt['tp-pm2'].' ',$context['user']['unread_messages'] , '</a>';
}
// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '
' , $bullet , '<a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">'.$txt['tp_unapproved_members'].' '. $context['unapproved_members'] . '</a>';
if(isset($context['TPortal']['userbox']['unread']))
echo '
' , $bullet , '<a href="', $scripturl, '?action=unread">' .$txt['tp-unread'].'</a>
' , $bullet , '<a href="', $scripturl, '?action=unreadreplies">'.$txt['tp-replies'].'</a>
' , $bullet , '<a href="', $scripturl, '?action=profile;u='.$context['user']['id'].';sa=showPosts">'.$txt['tp-showownposts'].'</a>
' , $bullet , '<a href="', $scripturl, '?action=tpmod;sa=showcomments">'.$txt['tp-showcomments'].'</a><br />
';
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
' , $bullet , $txt['tp_maintenace'];
// Show the total time logged in?
if (!empty($context['user']['total_time_logged_in']) && isset($context['TPortal']['userbox']['logged']))
{
echo '
' , $bullet , $txt['tp-loggedintime'] , $context['user']['total_time_logged_in']['days'] . $txt['tp-acronymdays']. $context['user']['total_time_logged_in']['hours'] . $txt['tp-acronymhours']. $context['user']['total_time_logged_in']['minutes'] .$txt['tp-acronymminutes'];
}
echo '
' , $bullet , $context['current_time'] , '<br />';
// admin parts etc.
if(!isset($context['TPortal']['can_submit_article']))
$context['TPortal']['can_submit_article']=0;
// do not show if none is availalable
if($context['TPortal']['can_submit_article']==1 || allowedTo(array('tp_dlupload','tp_dlmanager','tp_settings','tp_articles','tp_blocks','tp_submithtml','tp_submitbbc')))
{
// can we submit an article?
if(!allowedTo('tp_articles'))
{
if(allowedTo('tp_submithtml'))
echo '
' , $bullet , '<a href="', $scripturl, '?action=tpmod;sa=submitarticle">' . $txt['tp-submitarticle']. '</a>';
if(allowedTo('tp_submitbbc'))
echo '
' , $bullet , '<a href="', $scripturl, '?action=tpmod;sa=submitarticle;bbc">' . $txt['tp-submitarticlebbc']. '</a>';
}
// upload a file?
if(allowedTo('tp_dlupload') || allowedTo('tp_dlmanager'))
echo '
' , $bullet , '<a href="', $scripturl, '?action=tpmod;dl=upload">' . $txt['permissionname_tp_dlupload']. '</a>';
// tpadmin checks
if (allowedTo('tp_settings'))
echo '
' , $bullet , '<a href="' . $scripturl . '?action=tpadmin;sa=settings">' . $txt['permissionname_tp_settings'] . '</a>';
if (allowedTo('tp_blocks'))
echo '
' , $bullet , '<a href="' . $scripturl . '?action=tpadmin;sa=blocks">' . $txt['permissionname_tp_blocks'] . '</a>';
if (allowedTo('tp_articles'))
{
echo '
' , $bullet , '<a href="' . $scripturl . '?action=tpadmin;sa=articles">' . $txt['permissionname_tp_articles'] . '</a>';
// any submissions?
if($context['TPortal']['submitcheck']['articles']>0)
echo '
' , $bullet , '<a href="' . $scripturl . '?action=tpadmin;sa=submission"><b>' . $context['TPortal']['submitcheck']['articles'] . ' ' .$txt['tp-articlessubmitted'] . '</b></a>';
}
if (allowedTo('tp_dlmanager'))
{
echo '
' , $bullet , '<a href="' . $scripturl . '?action=tpmod;dl=admin">' . $txt['permissionname_tp_dlmanager'] . '</a>';
// any submissions?
if($context['TPortal']['submitcheck']['uploads']>0)
echo '
' , $bullet , '<a href="' . $scripturl . '?action=tpmod;dl=adminsubmission"><b>' . $context['TPortal']['submitcheck']['uploads'] . ' ' .$txt['tp-dluploaded'] . '</b></a>';
}
}
// add adminhooks
if(sizeof($context['TPortal']['tpmodules']['adminhook'])>0)
{
foreach($context['TPortal']['tpmodules']['adminhook'] as $link)
echo $bullet , '<a href="' . $scripturl . '?'.$link['action'].'">' . $link['title']. '</a>';
}
}
// Otherwise they're a guest - so politely ask them to register or login.
else{
echo '
<div>', $txt['hi_guest'], '</div>
<div class="smalltext">', $context['current_time'], '</div>
<form style="margin-top: 5px;" action="', $scripturl, '?action=login2" method="post" >
<input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" /><br />
<select name="cookielength">
<option value="60">', $txt['one_hour'], '</option>
<option value="1440">', $txt['one_day'], '</option>
<option value="10080">', $txt['one_week'], '</option>
<option value="302400">', $txt['one_month'], '</option>
<option value="-1" selected="selected">', $txt['forever'], '</option>
</select>
<input type="submit" value="', $txt['login'], '" />
</form>
<span class="smalltext">', $txt['quick_login_dec'], '</span>
<br />';
}
if (!empty($context['user']['avatar']) && isset($context['TPortal']['userbox']['avatar']))
echo '<p>' , $context['user']['avatar']['image'] , '</p>';
echo '
</div>';
// STATS....
echo'
<div class="tp_statsblock">';
if(isset($context['TPortal']['userbox']['stats']))
// members stats
echo '
<h5 class="mlist"><a href="'.$scripturl.'?action=mlist">'.$txt['members'].'</a></h5>
' , $bullet , $txt['total_members'].': ' , isset($modSettings['memberCount']) ? $modSettings['memberCount'] : $modSettings['totalMembers'] , '
' , $bullet , $txt['tp-latest']. ': <a href="', $scripturl, '?action=profile;u=', $modSettings['latestMember'], '"><strong>', $modSettings['latestRealName'], '</strong></a>
';
if(isset($context['TPortal']['userbox']['stats_all']))
// more stats
echo '
<h5 class="stats"><a href="'.$scripturl.'?action=stats">'.$txt['tp-stats'].'</a></h5>
' , $bullet , $txt['total_posts'].': '.$modSettings['totalMessages']. '
' , $bullet , $txt['total_topics'].': '.$modSettings['totalTopics']. '
' , $bullet , $txt['tp-mostonline-today'].': '.$modSettings['mostOnlineToday'].'
' , $bullet , $txt['tp-mostonline'].': '.$modSettings['mostOnline'].'
('.timeformat($modSettings['mostDate']).')';
if(isset($context['TPortal']['userbox']['online']))
{
// add online users
echo '
<h5 class="online"><a href="'.$scripturl.'?action=who">'.$txt['online_users'].'</a></h5>
<div>';
$online = ssi_whosOnline('array');
echo $bullet , $txt['tp-users'].': '.$online['num_users']. '
' , $bullet , $txt['tp-guests'].': '.$online['guests'].'
' , $bullet , $txt['tp-total'].': '.$online['total_users'].'
<div style="max-height: 23em; overflow: auto;">';
foreach($online['users'] as $user)
{
echo $user['hidden'] ? '<i>' . $user['link'] . '</i>' : $user['link'];
echo ' ';
}
echo '
</div></div>';
}
echo '
</div>';
Just curious: all these custom php blocks you have: did you set these up yourself?
If so, it should not be a surprise that with SMF and TP developing, these blocks require maintenance/ updating.
If not, this may be a more general warning message: since the software is getting updated over time, custom php code must follow... so when you have custom php code blocks or php articles, these must always be checked when upgrading!
I'm sure I grabbed them from people on this site many years ago. Seems between TP 1x to 3, the php 5 to 7/8 and Mariadb/Mysql move to 10 changed enough to keep them working on the old site and break things on the new site. I can't even find exactly which version of TP I am running on the old site. Package Manager is so messed up. The Changelog_TP.txt has 1.090 beta 5 as the newest version, some of the file say version 2 some say version 1 LOL.. So, like I said it's a mess.. and I have ignored it for several years except to update some content occasionally.
But good news, I think I have all the rogue TP blocks eliminated. That block I found by just turning off all the panels, then back on one at a time, testing to see of got errors, no errors from any of the blocks in that panel, turned it off, and turned on next.. kept that up until errors started up. Then did same thing with the blocks until I found all the through errors into the error log.
I might make an attempt to fix the block as my rusty php coding comes back. Not sure. Some of the functionality is probably built in now. I have to look and see.
My next steps are to get some of the other mods which have been update for SMF 2.1 installed and see what I can break then.
Thanks
Mitch
I can have at look at the block codes if you post them here... maybe we can post the corrected codes back onto the forum
Not sure what one I posted below. Ah yes the Stats and Info block: DOES NOT WORK WITH TP3
global $context, $settings, $options, $scripturl, $txt, $modSettings;
$bullet = '<img src="Themes/default/images/tinyportal/TPdivider.gif" style="margin-right: 5px; margin-left: 5px" />';
echo'
<div class="tp_userblock">';
// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
<h4>', $txt['hello_member'], ' ', $context['user']['name'], '</h4>
';
// Only tell them about their messages if they can read their messages!
if ($context['allow_pm']){
echo '
' , $bullet , '<a href="', $scripturl, '?action=pm">' .$txt['tp-pm'].' ', $context['user']['messages'], '</a>';
if($context['user']['unread_messages']>0)
echo '
' , $bullet , '<a href="', $scripturl, '?action=pm">' .$txt['tp-pm2'].' ',$context['user']['unread_messages'] , '</a>';
}
// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '
' , $bullet , '<a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">'.$txt['tp_unapproved_members'].' '. $context['unapproved_members'] . '</a>';
if(isset($context['TPortal']['userbox']['unread']))
echo '
' , $bullet , '<a href="', $scripturl, '?action=unread">' .$txt['tp-unread'].'</a>
' , $bullet , '<a href="', $scripturl, '?action=unreadreplies">'.$txt['tp-replies'].'</a>
' , $bullet , '<a href="', $scripturl, '?action=profile;u='.$context['user']['id'].';sa=showPosts">'.$txt['tp-showownposts'].'</a>
' , $bullet , '<a href="', $scripturl, '?action=tpmod;sa=showcomments">'.$txt['tp-showcomments'].'</a><br />
';
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
' , $bullet , $txt['tp_maintenace'];
// Show the total time logged in?
if (!empty($context['user']['total_time_logged_in']) && isset($context['TPortal']['userbox']['logged']))
{
echo '
' , $bullet , $txt['tp-loggedintime'] , $context['user']['total_time_logged_in']['days'] . $txt['tp-acronymdays']. $context['user']['total_time_logged_in']['hours'] . $txt['tp-acronymhours']. $context['user']['total_time_logged_in']['minutes'] .$txt['tp-acronymminutes'];
}
echo '
' , $bullet , $context['current_time'] , '<br />';
// admin parts etc.
if(!isset($context['TPortal']['can_submit_article']))
$context['TPortal']['can_submit_article']=0;
// do not show if none is availalable
if($context['TPortal']['can_submit_article']==1 || allowedTo(array('tp_dlupload','tp_dlmanager','tp_settings','tp_articles','tp_blocks','tp_submithtml','tp_submitbbc')))
{
// can we submit an article?
if(!allowedTo('tp_articles'))
{
if(allowedTo('tp_submithtml'))
echo '
' , $bullet , '<a href="', $scripturl, '?action=tpmod;sa=submitarticle">' . $txt['tp-submitarticle']. '</a>';
if(allowedTo('tp_submitbbc'))
echo '
' , $bullet , '<a href="', $scripturl, '?action=tpmod;sa=submitarticle;bbc">' . $txt['tp-submitarticlebbc']. '</a>';
}
// upload a file?
if(allowedTo('tp_dlupload') || allowedTo('tp_dlmanager'))
echo '
' , $bullet , '<a href="', $scripturl, '?action=tpmod;dl=upload">' . $txt['permissionname_tp_dlupload']. '</a>';
// tpadmin checks
if (allowedTo('tp_settings'))
echo '
' , $bullet , '<a href="' . $scripturl . '?action=tpadmin;sa=settings">' . $txt['permissionname_tp_settings'] . '</a>';
if (allowedTo('tp_blocks'))
echo '
' , $bullet , '<a href="' . $scripturl . '?action=tpadmin;sa=blocks">' . $txt['permissionname_tp_blocks'] . '</a>';
if (allowedTo('tp_articles'))
{
echo '
' , $bullet , '<a href="' . $scripturl . '?action=tpadmin;sa=articles">' . $txt['permissionname_tp_articles'] . '</a>';
// any submissions?
if($context['TPortal']['submitcheck']['articles']>0)
echo '
' , $bullet , '<a href="' . $scripturl . '?action=tpadmin;sa=submission"><b>' . $context['TPortal']['submitcheck']['articles'] . ' ' .$txt['tp-articlessubmitted'] . '</b></a>';
}
if (allowedTo('tp_dlmanager'))
{
echo '
' , $bullet , '<a href="' . $scripturl . '?action=tpmod;dl=admin">' . $txt['permissionname_tp_dlmanager'] . '</a>';
// any submissions?
if($context['TPortal']['submitcheck']['uploads']>0)
echo '
' , $bullet , '<a href="' . $scripturl . '?action=tpmod;dl=adminsubmission"><b>' . $context['TPortal']['submitcheck']['uploads'] . ' ' .$txt['tp-dluploaded'] . '</b></a>';
}
}
// add adminhooks
if(sizeof($context['TPortal']['tpmodules']['adminhook'])>0)
{
foreach($context['TPortal']['tpmodules']['adminhook'] as $link)
echo $bullet , '<a href="' . $scripturl . '?'.$link['action'].'">' . $link['title']. '</a>';
}
}
// Otherwise they're a guest - so politely ask them to register or login.
else{
echo '
<div>', $txt['hi_guest'], '</div>
<div class="smalltext">', $context['current_time'], '</div>
<form style="margin-top: 5px;" action="', $scripturl, '?action=login2" method="post" >
<input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" /><br />
<select name="cookielength">
<option value="60">', $txt['one_hour'], '</option>
<option value="1440">', $txt['one_day'], '</option>
<option value="10080">', $txt['one_week'], '</option>
<option value="302400">', $txt['one_month'], '</option>
<option value="-1" selected="selected">', $txt['forever'], '</option>
</select>
<input type="submit" value="', $txt['login'], '" />
</form>
<span class="smalltext">', $txt['quick_login_dec'], '</span>
<br />';
}
if (!empty($context['user']['avatar']) && isset($context['TPortal']['userbox']['avatar']))
echo '<p>' , $context['user']['avatar']['image'] , '</p>';
echo '
</div>';
// STATS....
echo'
<div class="tp_statsblock">';
if(isset($context['TPortal']['userbox']['stats']))
// members stats
echo '
<h5 class="mlist"><a href="'.$scripturl.'?action=mlist">'.$txt['members'].'</a></h5>
' , $bullet , $txt['total_members'].': ' , isset($modSettings['memberCount']) ? $modSettings['memberCount'] : $modSettings['totalMembers'] , '
' , $bullet , $txt['tp-latest']. ': <a href="', $scripturl, '?action=profile;u=', $modSettings['latestMember'], '"><strong>', $modSettings['latestRealName'], '</strong></a>
';
if(isset($context['TPortal']['userbox']['stats_all']))
// more stats
echo '
<h5 class="stats"><a href="'.$scripturl.'?action=stats">'.$txt['tp-stats'].'</a></h5>
' , $bullet , $txt['total_posts'].': '.$modSettings['totalMessages']. '
' , $bullet , $txt['total_topics'].': '.$modSettings['totalTopics']. '
' , $bullet , $txt['tp-mostonline-today'].': '.$modSettings['mostOnlineToday'].'
' , $bullet , $txt['tp-mostonline'].': '.$modSettings['mostOnline'].'
('.timeformat($modSettings['mostDate']).')';
if(isset($context['TPortal']['userbox']['online']))
{
// add online users
echo '
<h5 class="online"><a href="'.$scripturl.'?action=who">'.$txt['online_users'].'</a></h5>
<div>';
$online = ssi_whosOnline('array');
echo $bullet , $txt['tp-users'].': '.$online['num_users']. '
' , $bullet , $txt['tp-guests'].': '.$online['guests'].'
' , $bullet , $txt['tp-total'].': '.$online['total_users'].'
<div style="max-height: 23em; overflow: auto;">';
foreach($online['users'] as $user)
{
echo $user['hidden'] ? '<i>' . $user['link'] . '</i>' : $user['link'];
echo ' ';
}
echo '
</div></div>';
}
echo '
</div>';
Attached is a screen shot of what it produced.
Old News block, each news item fades out into the next: DOES NOT WORK WITH TP3
global $context, $settings, $options, $txt, $scripturl, $modSettings;
// Show the news fader? (assuming there are things to show...)
// if ($settings['show_newsfader'] && !empty($context['fader_news_lines']))
{
echo '
<div style="height: 107px">';
// <div style="height: 85px; background: url('.$settings['images_url'].'/machine.jpg) repeat-x;">';
// Prepare all the javascript settings.
echo '
<div id="smfFadeScroller" style="text-align: center; width: 90%; padding: 2px;"><b>', $context['news_lines']
, '</b></div>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
// The fading delay (in ms.)
var smfFadeDelay = ', empty($settings['newsfader_time']) ? 5000 : $settings['newsfader_time'], ';
// Fade from... what text color? To which background color?
var smfFadeFrom = {"r": 155, "g": 185, "b": 255}, smfFadeTo = {"r": 0, "g": 0, "b": 0};
// Surround each item with... anything special?
var smfFadeBefore = "<b>", smfFadeAfter = "</b>";
var foreColor, backEl, backColor;
if (typeof(document.getElementById(\'smfFadeScroller\').currentStyle) != "undefined")
{
foreColor = document.getElementById(\'smfFadeScroller\').currentStyle.color.match(/#([\da-f][\da-f])([\da-f][\da-f])([\da-f][\da-f])/);
smfFadeFrom = {"r": parseInt(foreColor[1]), "g": parseInt(foreColor[2]), "b": parseInt(foreColor[3])};
backEl = document.getElementById(\'smfFadeScroller\');
while (backEl.currentStyle.backgroundColor == "transparent" && typeof(backEl.parentNode) != "undefined")
backEl = backEl.parentNode;
backColor = backEl.currentStyle.backgroundColor.match(/#([\da-f][\da-f])([\da-f][\da-f])([\da-f][\da-f])/);
smfFadeTo = {"r": eval("0x" + backColor[1]), "g": eval("0x" + backColor[2]), "b": eval("0x" + backColor[3])};
}
else if (typeof(window.opera) == "undefined" && typeof(document.defaultView) != "undefined")
{
foreColor = document.defaultView.getComputedStyle(document.getElementById(\'smfFadeScroller\'), null).color.match(/rgb\((\d+), (\d+), (\d+)\)/);
smfFadeFrom = {"r": parseInt(foreColor[1]), "g": parseInt(foreColor[2]), "b": parseInt(foreColor[3])};
backEl = document.getElementById(\'smfFadeScroller\');
while (document.defaultView.getComputedStyle(backEl, null).backgroundColor == "transparent" && typeof(backEl.parentNode) != "undefined" && typeof(backEl.parentNode.tagName) != "undefined")
backEl = backEl.parentNode;
backColor = document.defaultView.getComputedStyle(backEl, null).backgroundColor.match(/rgb\((\d+), (\d+), (\d+)\)/);
smfFadeTo = {"r": parseInt(backColor[1]), "g": parseInt(backColor[2]), "b": parseInt(backColor[3])};
}
// List all the lines of the news for display.
var smfFadeContent = new Array(
"', implode('",
"', $context['fader_news_lines']), '"
);
// ]]></script><script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/fader.js"></script></div>';
}
Quote from: GhostRider2110 on June 20, 2024, 08:05:02 PMNot sure what one I posted below. Ah yes the Stats and Info block: DOES NOT WORK WITH TP3
global $context, $settings, $options, $scripturl, $txt, $modSettings;
$bullet = '<img src="Themes/default/images/tinyportal/TPdivider.gif" style="margin-right: 5px; margin-left: 5px" />';
echo'
<div class="tp_userblock">';
// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
<h4>', $txt['hello_member'], ' ', $context['user']['name'], '</h4>
';
// Only tell them about their messages if they can read their messages!
if ($context['allow_pm']){
echo '
' , $bullet , '<a href="', $scripturl, '?action=pm">' .$txt['tp-pm'].' ', $context['user']['messages'], '</a>';
if($context['user']['unread_messages']>0)
echo '
' , $bullet , '<a href="', $scripturl, '?action=pm">' .$txt['tp-pm2'].' ',$context['user']['unread_messages'] , '</a>';
}
// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '
' , $bullet , '<a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">'.$txt['tp_unapproved_members'].' '. $context['unapproved_members'] . '</a>';
if(isset($context['TPortal']['userbox']['unread']))
echo '
' , $bullet , '<a href="', $scripturl, '?action=unread">' .$txt['tp-unread'].'</a>
' , $bullet , '<a href="', $scripturl, '?action=unreadreplies">'.$txt['tp-replies'].'</a>
' , $bullet , '<a href="', $scripturl, '?action=profile;u='.$context['user']['id'].';sa=showPosts">'.$txt['tp-showownposts'].'</a>
' , $bullet , '<a href="', $scripturl, '?action=tpmod;sa=showcomments">'.$txt['tp-showcomments'].'</a><br />
';
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
' , $bullet , $txt['tp_maintenace'];
// Show the total time logged in?
if (!empty($context['user']['total_time_logged_in']) && isset($context['TPortal']['userbox']['logged']))
{
echo '
' , $bullet , $txt['tp-loggedintime'] , $context['user']['total_time_logged_in']['days'] . $txt['tp-acronymdays']. $context['user']['total_time_logged_in']['hours'] . $txt['tp-acronymhours']. $context['user']['total_time_logged_in']['minutes'] .$txt['tp-acronymminutes'];
}
echo '
' , $bullet , $context['current_time'] , '<br />';
// admin parts etc.
if(!isset($context['TPortal']['can_submit_article']))
$context['TPortal']['can_submit_article']=0;
// do not show if none is availalable
if($context['TPortal']['can_submit_article']==1 || allowedTo(array('tp_dlupload','tp_dlmanager','tp_settings','tp_articles','tp_blocks','tp_submithtml','tp_submitbbc')))
{
// can we submit an article?
if(!allowedTo('tp_articles'))
{
if(allowedTo('tp_submithtml'))
echo '
' , $bullet , '<a href="', $scripturl, '?action=tpmod;sa=submitarticle">' . $txt['tp-submitarticle']. '</a>';
if(allowedTo('tp_submitbbc'))
echo '
' , $bullet , '<a href="', $scripturl, '?action=tpmod;sa=submitarticle;bbc">' . $txt['tp-submitarticlebbc']. '</a>';
}
// upload a file?
if(allowedTo('tp_dlupload') || allowedTo('tp_dlmanager'))
echo '
' , $bullet , '<a href="', $scripturl, '?action=tpmod;dl=upload">' . $txt['permissionname_tp_dlupload']. '</a>';
// tpadmin checks
if (allowedTo('tp_settings'))
echo '
' , $bullet , '<a href="' . $scripturl . '?action=tpadmin;sa=settings">' . $txt['permissionname_tp_settings'] . '</a>';
if (allowedTo('tp_blocks'))
echo '
' , $bullet , '<a href="' . $scripturl . '?action=tpadmin;sa=blocks">' . $txt['permissionname_tp_blocks'] . '</a>';
if (allowedTo('tp_articles'))
{
echo '
' , $bullet , '<a href="' . $scripturl . '?action=tpadmin;sa=articles">' . $txt['permissionname_tp_articles'] . '</a>';
// any submissions?
if($context['TPortal']['submitcheck']['articles']>0)
echo '
' , $bullet , '<a href="' . $scripturl . '?action=tpadmin;sa=submission"><b>' . $context['TPortal']['submitcheck']['articles'] . ' ' .$txt['tp-articlessubmitted'] . '</b></a>';
}
if (allowedTo('tp_dlmanager'))
{
echo '
' , $bullet , '<a href="' . $scripturl . '?action=tpmod;dl=admin">' . $txt['permissionname_tp_dlmanager'] . '</a>';
// any submissions?
if($context['TPortal']['submitcheck']['uploads']>0)
echo '
' , $bullet , '<a href="' . $scripturl . '?action=tpmod;dl=adminsubmission"><b>' . $context['TPortal']['submitcheck']['uploads'] . ' ' .$txt['tp-dluploaded'] . '</b></a>';
}
}
// add adminhooks
if(sizeof($context['TPortal']['tpmodules']['adminhook'])>0)
{
foreach($context['TPortal']['tpmodules']['adminhook'] as $link)
echo $bullet , '<a href="' . $scripturl . '?'.$link['action'].'">' . $link['title']. '</a>';
}
}
// Otherwise they're a guest - so politely ask them to register or login.
else{
echo '
<div>', $txt['hi_guest'], '</div>
<div class="smalltext">', $context['current_time'], '</div>
<form style="margin-top: 5px;" action="', $scripturl, '?action=login2" method="post" >
<input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" /><br />
<select name="cookielength">
<option value="60">', $txt['one_hour'], '</option>
<option value="1440">', $txt['one_day'], '</option>
<option value="10080">', $txt['one_week'], '</option>
<option value="302400">', $txt['one_month'], '</option>
<option value="-1" selected="selected">', $txt['forever'], '</option>
</select>
<input type="submit" value="', $txt['login'], '" />
</form>
<span class="smalltext">', $txt['quick_login_dec'], '</span>
<br />';
}
if (!empty($context['user']['avatar']) && isset($context['TPortal']['userbox']['avatar']))
echo '<p>' , $context['user']['avatar']['image'] , '</p>';
echo '
</div>';
// STATS....
echo'
<div class="tp_statsblock">';
if(isset($context['TPortal']['userbox']['stats']))
// members stats
echo '
<h5 class="mlist"><a href="'.$scripturl.'?action=mlist">'.$txt['members'].'</a></h5>
' , $bullet , $txt['total_members'].': ' , isset($modSettings['memberCount']) ? $modSettings['memberCount'] : $modSettings['totalMembers'] , '
' , $bullet , $txt['tp-latest']. ': <a href="', $scripturl, '?action=profile;u=', $modSettings['latestMember'], '"><strong>', $modSettings['latestRealName'], '</strong></a>
';
if(isset($context['TPortal']['userbox']['stats_all']))
// more stats
echo '
<h5 class="stats"><a href="'.$scripturl.'?action=stats">'.$txt['tp-stats'].'</a></h5>
' , $bullet , $txt['total_posts'].': '.$modSettings['totalMessages']. '
' , $bullet , $txt['total_topics'].': '.$modSettings['totalTopics']. '
' , $bullet , $txt['tp-mostonline-today'].': '.$modSettings['mostOnlineToday'].'
' , $bullet , $txt['tp-mostonline'].': '.$modSettings['mostOnline'].'
('.timeformat($modSettings['mostDate']).')';
if(isset($context['TPortal']['userbox']['online']))
{
// add online users
echo '
<h5 class="online"><a href="'.$scripturl.'?action=who">'.$txt['online_users'].'</a></h5>
<div>';
$online = ssi_whosOnline('array');
echo $bullet , $txt['tp-users'].': '.$online['num_users']. '
' , $bullet , $txt['tp-guests'].': '.$online['guests'].'
' , $bullet , $txt['tp-total'].': '.$online['total_users'].'
<div style="max-height: 23em; overflow: auto;">';
foreach($online['users'] as $user)
{
echo $user['hidden'] ? '<i>' . $user['link'] . '</i>' : $user['link'];
echo ' ';
}
echo '
</div></div>';
}
echo '
</div>';
Attached is a screen shot of what it produced.
I believe this is better
global $context, $settings, $options, $scripturl, $txt, $modSettings;
$bullet = '<img src="Themes/default/images/tinyportal/TPdivider.png" style="margin-right: 5px; margin-left: 5px" />';
echo'
<div class="tp_userblock">';
// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged']) {
echo '
<h4>', $txt['hello_member'], ' ', $context['user']['name'], '</h4>
';
// Only tell them about their messages if they can read their messages!
if ($context['allow_pm']){
echo '
' , $bullet , '<a href="', $scripturl, '?action=pm">' .$txt['tp-pm'].' ', $context['user']['messages'], '</a>';
if($context['user']['unread_messages']>0)
echo '
' , $bullet , '<a href="', $scripturl, '?action=pm">' .$txt['tp-pm2'].' ',$context['user']['unread_messages'] , '</a>';
}
// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '
' , $bullet , '<a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">'.$txt['tp_unapproved_members'].' '. $context['unapproved_members'] . '</a>';
if(isset($context['TPortal']['userbox']['unread']))
echo '
' , $bullet , '<a href="', $scripturl, '?action=unread">' .$txt['tp-unread'].'</a>
' , $bullet , '<a href="', $scripturl, '?action=unreadreplies">'.$txt['tp-replies'].'</a>
' , $bullet , '<a href="', $scripturl, '?action=profile;u='.$context['user']['id'].';sa=showPosts">'.$txt['tp-showownposts'].'</a>
' , $bullet , '<a href="', $scripturl, '?action=tpmod;sa=showcomments">'.$txt['tp-showcomments'].'</a><br>
';
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
' , $bullet , $txt['tp_maintenace'];
// Show the total time logged in?
if (!empty($context['user']['total_time_logged_in']) && isset($context['TPortal']['userbox']['logged'])) {
echo '
' , $bullet , $txt['tp-loggedintime'] , $context['user']['total_time_logged_in']['days'] . $txt['tp-acronymdays']. $context['user']['total_time_logged_in']['hours'] . $txt['tp-acronymhours']. $context['user']['total_time_logged_in']['minutes'] .$txt['tp-acronymminutes'];
}
echo '
' , $bullet , $context['current_time'] , '<br>';
// admin parts etc.
if(!isset($context['TPortal']['can_submit_article']))
$context['TPortal']['can_submit_article']=0;
// do not show if none is availalable
if($context['TPortal']['can_submit_article']==1 || allowedTo(array('tp_dlupload','tp_dlmanager','tp_settings','tp_articles','tp_blocks','tp_submithtml','tp_submitbbc'))) {
// can we submit an article?
if(!allowedTo('tp_articles')) {
if(allowedTo('tp_submithtml'))
echo '
' , $bullet , '<a href="', $scripturl, '?action=tpmod;sa=submitarticle">' . $txt['tp-submitarticle']. '</a>';
if(allowedTo('tp_submitbbc'))
echo '
' , $bullet , '<a href="', $scripturl, '?action=tpmod;sa=submitarticle;bbc">' . $txt['tp-submitarticlebbc']. '</a>';
}
// upload a file?
if(allowedTo('tp_dlupload') || allowedTo('tp_dlmanager')) {
echo '
' , $bullet , '<a href="', $scripturl, '?action=tpmod;dl=upload">' . $txt['permissionname_tp_dlupload']. '</a>';
}
// tpadmin checks
if (allowedTo('tp_settings')) {
echo '
' , $bullet , '<a href="' . $scripturl . '?action=tpadmin;sa=settings">' . $txt['permissionname_tp_settings'] . '</a>';
}
if (allowedTo('tp_blocks')) {
echo '
' , $bullet , '<a href="' . $scripturl . '?action=tpadmin;sa=blocks">' . $txt['permissionname_tp_blocks'] . '</a>';
}
if (allowedTo('tp_articles')) {
echo '
' , $bullet , '<a href="' . $scripturl . '?action=tpadmin;sa=articles">' . $txt['permissionname_tp_articles'] . '</a>';
// any submissions?
if($context['TPortal']['submitcheck']['articles']>0)
echo '
' , $bullet , '<a href="' . $scripturl . '?action=tpadmin;sa=submission"><b>' . $context['TPortal']['submitcheck']['articles'] . ' ' .$txt['tp-articlessubmitted'] . '</b></a>';
}
if (allowedTo('tp_dlmanager')) {
echo '
' , $bullet , '<a href="' . $scripturl . '?action=tpmod;dl=admin">' . $txt['permissionname_tp_dlmanager'] . '</a>';
// any submissions?
if($context['TPortal']['submitcheck']['uploads']>0)
echo '
' , $bullet , '<a href="' . $scripturl . '?action=tpmod;dl=adminsubmission"><b>' . $context['TPortal']['submitcheck']['uploads'] . ' ' .$txt['tp-dluploaded'] . '</b></a>';
}
}
}
// Otherwise they're a guest - so politely ask them to register or login.
else {
echo '
<div style="line-height: 1.4em;">', sprintf($txt[$context['can_register'] ? 'tp-welcome_guest_register' : 'tp-welcome_guest'], $context['forum_name_html_safe'], $scripturl . '?action=login', 'return reqOverlayDiv(this.href, ' . JavaScriptEscape($txt['login']) . ');', $scripturl . '?action=signup'), '<br><br>', $context['current_time'], '</div>';
echo '
<form style="margin-top: 5px;" action="', $scripturl, '?action=login2" method="post" >
<input type="text" class="input_text" name="user" size="10" style="max-width: 45%!important;"/> <input type="password" class="input_password" name="passwrd" size="10" style="max-width: 45%!important;"/><br>
<select name="cookielength" style="max-width: 45%!important;">
<option value="-1" selected="selected">', $txt['forever'], '</option>
<option value="60">', $txt['one_hour'], '</option>
<option value="1440">', $txt['one_day'], '</option>
<option value="10080">', $txt['one_week'], '</option>
<option value="302400">', $txt['one_month'], '</option>
</select>
<input type="submit" class="button_submit" value="', $txt['login'], '" />
<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
<input type="hidden" name="', $context['login_token_var'], '" value="', $context['login_token'], '">';
echo '
</form>
<div style="line-height: 1.4em;" class="middletext">', $txt['tp-quick_login_dec'], '</div><br>';
}
if (!empty($context['user']['avatar']) && isset($context['TPortal']['userbox']['avatar']))
echo '<p>' , $context['user']['avatar']['image'] , '</p>';
echo '
</div>';
// STATS....
echo'
<div class="tp_statsblock">';
if(isset($context['TPortal']['userbox']['stats']))
// members stats
echo '
<h5 class="mlist"><a href="'.$scripturl.'?action=mlist">'.$txt['members'].'</a></h5>
' , $bullet , $txt['total_members'].': ' , isset($modSettings['memberCount']) ? $modSettings['memberCount'] : $modSettings['totalMembers'] , '
' , $bullet , $txt['tp-latest']. ': <a href="', $scripturl, '?action=profile;u=', $modSettings['latestMember'], '"><strong>', $modSettings['latestRealName'], '</strong></a>
';
if(isset($context['TPortal']['userbox']['stats_all']))
// more stats
echo '
<h5 class="stats"><a href="'.$scripturl.'?action=stats">'.$txt['tp-stats'].'</a></h5>
' , $bullet , $txt['total_posts'].': '.$modSettings['totalMessages']. '
' , $bullet , $txt['total_topics'].': '.$modSettings['totalTopics']. '
' , $bullet , $txt['tp-mostonline-today'].': '.$modSettings['mostOnlineToday'].'
' , $bullet , $txt['tp-mostonline'].': '.$modSettings['mostOnline'].'
('.timeformat($modSettings['mostDate']).')';
if(isset($context['TPortal']['userbox']['online']))
{
// add online users
echo '
<h5 class="online"><a href="'.$scripturl.'?action=who">'.$txt['online_users'].'</a></h5>
<div>';
$online = ssi_whosOnline('array');
echo $bullet , $txt['tp-users'].': '.$online['num_users']. '
' , $bullet , $txt['tp-guests'].': '.$online['guests'].'
' , $bullet , $txt['tp-total'].': '.$online['total_users'].'
<div style="max-height: 23em; overflow: auto;">';
foreach($online['users'] as $user)
{
echo $user['hidden'] ? '<i>' . $user['link'] . '</i>' : $user['link'];
echo ' ';
}
echo '
</div></div>';
}
echo '
</div>';
Quote from: GhostRider2110 on June 20, 2024, 08:07:15 PMOld News block, each news item fades out into the next: DOES NOT WORK WITH TP3
global $context, $settings, $options, $txt, $scripturl, $modSettings;
// Show the news fader? (assuming there are things to show...)
// if ($settings['show_newsfader'] && !empty($context['fader_news_lines']))
{
echo '
<div style="height: 107px">';
// <div style="height: 85px; background: url('.$settings['images_url'].'/machine.jpg) repeat-x;">';
// Prepare all the javascript settings.
echo '
<div id="smfFadeScroller" style="text-align: center; width: 90%; padding: 2px;"><b>', $context['news_lines']
, '</b></div>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
// The fading delay (in ms.)
var smfFadeDelay = ', empty($settings['newsfader_time']) ? 5000 : $settings['newsfader_time'], ';
// Fade from... what text color? To which background color?
var smfFadeFrom = {"r": 155, "g": 185, "b": 255}, smfFadeTo = {"r": 0, "g": 0, "b": 0};
// Surround each item with... anything special?
var smfFadeBefore = "<b>", smfFadeAfter = "</b>";
var foreColor, backEl, backColor;
if (typeof(document.getElementById(\'smfFadeScroller\').currentStyle) != "undefined")
{
foreColor = document.getElementById(\'smfFadeScroller\').currentStyle.color.match(/#([\da-f][\da-f])([\da-f][\da-f])([\da-f][\da-f])/);
smfFadeFrom = {"r": parseInt(foreColor[1]), "g": parseInt(foreColor[2]), "b": parseInt(foreColor[3])};
backEl = document.getElementById(\'smfFadeScroller\');
while (backEl.currentStyle.backgroundColor == "transparent" && typeof(backEl.parentNode) != "undefined")
backEl = backEl.parentNode;
backColor = backEl.currentStyle.backgroundColor.match(/#([\da-f][\da-f])([\da-f][\da-f])([\da-f][\da-f])/);
smfFadeTo = {"r": eval("0x" + backColor[1]), "g": eval("0x" + backColor[2]), "b": eval("0x" + backColor[3])};
}
else if (typeof(window.opera) == "undefined" && typeof(document.defaultView) != "undefined")
{
foreColor = document.defaultView.getComputedStyle(document.getElementById(\'smfFadeScroller\'), null).color.match(/rgb\((\d+), (\d+), (\d+)\)/);
smfFadeFrom = {"r": parseInt(foreColor[1]), "g": parseInt(foreColor[2]), "b": parseInt(foreColor[3])};
backEl = document.getElementById(\'smfFadeScroller\');
while (document.defaultView.getComputedStyle(backEl, null).backgroundColor == "transparent" && typeof(backEl.parentNode) != "undefined" && typeof(backEl.parentNode.tagName) != "undefined")
backEl = backEl.parentNode;
backColor = document.defaultView.getComputedStyle(backEl, null).backgroundColor.match(/rgb\((\d+), (\d+), (\d+)\)/);
smfFadeTo = {"r": parseInt(backColor[1]), "g": parseInt(backColor[2]), "b": parseInt(backColor[3])};
}
// List all the lines of the news for display.
var smfFadeContent = new Array(
"', implode('",
"', $context['fader_news_lines']), '"
);
// ]]></script><script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/fader.js"></script></div>';
}
this code is calling a script that does not exist in SMF2.1
sorry: it's not TP3.0 that is the issue, it's SMF2.1...
Thanks
The stats and info script is working great now, thanks
Mitch
Marking this Solved since original issues have been delt with. THANKS!!!!
Mitch