News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Global Topics

Started by margarett, March 27, 2009, 10:15:33 AM

Previous topic - Next topic

margarett

I'm sorry, I have absolutely no idea why that error occurs in your log... I can't reproduce it,,,

You can try to replace that line 3200 like this:
elseif (isset($topic_context['is_global']) && $topic_context['is_global'])

Does the MOD work? Can you relate a specific topic with this error? (eg, a sticky, locked, etc)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

DSystem

Tested. Worked perfectly


Thank you very much.

Westwegoman

I get same error in my error log.

Apply Filter: Only show the error messages of this URL
http://www.bayoustatefishing.com/community/index.php?action=unread
Apply Filter: Only show the errors with the same message
8: Undefined index: is_global
Apply Filter: Only show the errors from this file
File: /community/Sources/Subs.php
Line: 3279


Line 3279 is:
elseif ($topic_context['is_global'])

I also noticed that if you set the topic "not global" after setting it as global even with it not set as sticky. it remains at the top of page above sticky topics but only in the board that it was posted in. It disappears from the other boards as it should.

margarett

#43
When does that error show up?
Quote from: margarett on May 04, 2014, 05:34:42 PM
Can you relate a specific topic with this error? (eg, a sticky, locked, etc)

Quote from: Westwegoman on May 05, 2014, 10:12:25 AM
I also noticed that if you set the topic "not global" after setting it as global even with it not set as sticky. it remains at the top of page above sticky topics but only in the board that it was posted in. It disappears from the other boards as it should.
Confirmed, will look into it.
edit: needs a closer look, I already see why it happens but it's definitely a bug.
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Westwegoman

Quote from: margarett on May 05, 2014, 10:59:05 AM
When does that error show up?
Quote from: margarett on May 04, 2014, 05:34:42 PM
Can you relate a specific topic with this error? (eg, a sticky, locked, etc)

At the time of the error in the error log, there were no topics marked as global.

The topic that remained at top when it was marked not global wasn't sticky or locked.

And for some reason, I can not replicate the error in the log now.

Westwegoman

Ok. I was able to replicate the error in the error log.

When no topics are marked as "global" and the user clicks on "Show unread posts since last visit" it throws the following error. It doesn't do it on the admin account for some reason.


Apply Filter: Only show the error messages of this URL
http://www.bayoustatefishing.com/community/index.php?action=unread
Apply Filter: Only show the errors with the same message
8: Undefined index: is_global
Apply Filter: Only show the errors from this file
File: /community/Sources/Subs.php
Line: 3279


Also, any idea why the post would stay on top even when it is removed from being global?
Nevermind. I see your updated post.

onepiece

determineTopicClass() function is used by multiple functions and they probably don't fetch the 'is_global' field. They don't need it either way. The following should be fine for that line:

elseif (!empty($topic_context['is_global']))

The other issue is because you have the field 'is_global' added as 'varchar'. Change that to 'tinyint' (4) with a default of '0' and it should be okay. (you could have the '0' default for 'varchar' too or can just change the code to change the field value to nothing when a topic is "ungloballed" but they just don't sound right) It should be proper to do the same for the 'global_topics' field too.

Pipke

also a note:

if you set the topic to global and (perhaps) sticky, poll no icon is showing up on messageindex, fix idea -> global icon should be overrule the sticky/poll icon?
"If something is wrong, fix it if you can. But train yourself not to worry: Worry never fixes anything."

Click here to view my mods for SMF

Hey 👋 Did i helped... you like what i do. You can now buy me a coffee! ☕

margarett

Yes, this happens. The sticky/poll class has the highest priority. I can change that, yes ;)

PS: I haven't forget the other issues, just hadn't time to fix them yet :(
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

margarett

Finally :P

Released an update of this MOD that should fix all issues you identified (thank you for that)

Please uninstall the previous version (IMPORTANT: you need to choose to remove the associated data, as there are database changes!) and install the new one.


Quote from: onepiece on May 05, 2014, 03:36:50 PM
The other issue is because you have the field 'is_global' added as 'varchar'. Change that to 'tinyint' (4) with a default of '0' and it should be okay. (...) It should be proper to do the same for the 'global_topics' field too.
Thank you :)

Quote from: Pipke on May 06, 2014, 02:40:02 PM
if you set the topic to global and (perhaps) sticky, poll no icon is showing up on messageindex, fix idea -> global icon should be overrule the sticky/poll icon?
This was added

Quote from: Westwegoman on May 05, 2014, 02:44:32 PM
When no topics are marked as "global" and the user clicks on "Show unread posts since last visit" it throws the following error. It doesn't do it on the admin account for some reason.
This was fixed

Quote from: Westwegoman on May 05, 2014, 10:12:25 AM
I also noticed that if you set the topic "not global" after setting it as global even with it not set as sticky. it remains at the top of page above sticky topics but only in the board that it was posted in. It disappears from the other boards as it should.
This was fixed (thanks onepiece :) )

@DSystem, I didn't add PT_BR language because I need to take care of the encoding first. It's not forgotten ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

MotRude

Thank you for this mod...Great work!

Westwegoman

Installed the updated version. Working great.

Thanks!

NoPasaran


I deleted the old plugin, but did not delete the database


I installed the new version but did not improve.
kralkartal.net SMF 2.0.8

margarett

You should have :P
You need to uninstall the mod (it won't offer you to undo the database changes), manually remove the MOD column in boards and topics tables and reinstall it
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

NoPasaran

kralkartal.net SMF 2.0.8

Westwegoman

I just noticed that when "Enable Global Topics" is unchecked on a board, the topic doesn't show up at the top in the board but does still show up in the list of topics in that board.

Pipke

Private Risk with this Mod, atleast or my forum?

Ill explain, if you dont set Enable Global Topics on board in Admin, ie.like a hidden/private board not for guest or regular members, the button to set Global Topic is still there if you make a post in that Board and if you press that the hidden/private post will be added to all Boards and that will mean everyone can see the post wich as actually hidden/private. Could you fix that please.

"If something is wrong, fix it if you can. But train yourself not to worry: Worry never fixes anything."

Click here to view my mods for SMF

Hey 👋 Did i helped... you like what i do. You can now buy me a coffee! ☕

margarett

Thank you for for reporting, I'll check. Same for Westwegoman ;)

I'm sorry for being a bit absent, I'm having some crazy weeks with my job...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Westwegoman

No problem. I know all to much how the craziness can get at the job.

margarett

Both problems now fixed ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Advertisement: