Global Topics

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

Previous topic - Next topic

Westwegoman


Pipke

"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! ☕

NekoJonez

So, I got the error with the undefined "is_global" thingy.
Also, the images are broken.
Retro video game blogger, writer, actor, podcaster and general amazing dude.

Twitter
My Blog

margarett

Uh? :o now that's strange. I have to check, maybe I messed with older files? (Not likely, though...)
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

I just confirmed in a clean install and everything is in place. You need to give more details...
How can you get the "undefined is_global"? What image is broken?
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

NekoJonez

The one for the stickies. And I get the undefined is_global error in the "Last replies" thingies.
Retro video game blogger, writer, actor, podcaster and general amazing dude.

Twitter
My Blog

margarett

Check that you are using the latest version of the MOD... I just tested in a clean install and it worked fine...
It's the stickies icon that's damaged, or the global topics icon?
Can you printscreen and point the issue?
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

I'm sorry, but not really...

Global topics have full priority. This means that a global topic can not request the "global_locked" icon:
//Global Topics have full priority
if (!empty($topic_context['is_global']))
$topic_context['class'] = 'global';

(from Subs.php --> function determineTopicClass)

And yes, you're right, they don't have the lock ;)

In order to have the icons on the right, you'd need to edit MessageIndex.template.php. Buts that's a tabbed layout, not that easy to mess with...
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

You should be using the older version of the MOD (I hope that our modsite isn't giving you an older version than the one I loaded), or a theme that handles the icons differently... Does it happen with default theme?

The code that displays the image (in default MessageIndex.template.php) is this:
<img src="', $settings['images_url'], '/topic/', $topic['class'], '.gif" alt="" />
In the code I've shown above, the topic class is only "global" even if locked, sticky, with or without participation, so the only image you need is "global.gif"...
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

Ah :) So you should uninstall (make sure to choose to remove associated data, as there were database changes -- you need to reconfigure boards and global topics again) and reinstall the current one ;)
http://www.simplemachines.org/community/index.php?topic=301482.msg3693935#msg3693935
There were some important fixes... (note topics order, etc)

The current version, however, has no way to have the globe with the lock and the sticky and so on...
For you to customize the look of the global topics, there is a new class added to index.css that you can edit to make it look like you want to ;)
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

I don't have that anymore, sorry :(
That version was the first I released after taking over and I only changed enough to make it install cleanly in 2.0.7. The fixes came after...
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

#71
I also don't have that :(
(If I did, I could easily make a 2.0 package again)
* margarett is trying to remember why isn't this on his GitHub page where changes are stored...

Anyway, most the code is the same, there were small changes that I should be able to give you once I get to the computer ;)

edit: here it goes, let's hope I don't forget anything...
1 - Database changes. Run the following queries in phpmyadmin:
ALTER TABLE smf_boards CHANGE global_topics global_topics TINYINT( 4 ) NOT NULL DEFAULT '0';
ALTER TABLE smf_topics CHANGE is_global is_global TINYINT( 4 ) NOT NULL DEFAULT '0';
(check that your table prefix is "smf_")

2 - Code changes:
Sources/Subs.php, function "determineTopicClass"
You should have something like this:
$topic_context['class'] = 'hot';
elseif ($topic_context['is_global'])
$topic_context['class'] = 'global';

Remove this bit:
elseif ($topic_context['is_global'])
$topic_context['class'] = 'global';

A bit below, find this:
// This is so old themes will still work.
$topic_context['extended_class'] = &$topic_context['class'];

Before, add this:
//Global Topics have full priority
if (!empty($topic_context['is_global']))
$topic_context['class'] = 'global';


Sources/MessageIndex.php, find this:
if (empty($_REQUEST['start']))
Replace with this:
if (empty($_REQUEST['start']) && !empty($board_info['global_topics']))
Sources/Display.php
Find:
// Cleanup all the permissions with extra stuff...
Add after:
$context['can_global'] &= !empty($board_info['global_topics']);
Sources/Recent.php
Find:
t.num_replies, t.num_views, ms.id_member AS id_first_member, ml.id_member AS id_last_member,
Add after (inline)
t.is_global,

Please attach your MessageIndex.template.php, I'm not sure if I did something to that...
There are changes in Recent.template.php but that's easy to track since there were none in the version you have.
And I think that's 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

margarett

All is good, nothing to change there.

Do note that, going through this route, you will be completely unable to uninstall this MOD automatically in the future...
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

Ninja ZX-10RR

And here we go again margarett, thanks for the awesome mod but i discovered a little annoying thing that occurs because i customized the Default theme but i have no idea of how to fix this thing. Practically the topic is not requesting the same css info as sticky topics and as a result of this it showes the black background so awful for my theme (well at least i think that is the problem but i might be wrong you surely know better). I attached a screenshot if you want to take a look.
This is the page link so you don't have to copy and paste it: http://vige.altervista.org/forum/index.php?board=6.0
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

margarett

Thanks ;)
Actually it looks good to me... I see the global topic with the light blue background...
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

Ninja ZX-10RR

I definitely believe you if you say so but... I even tried to delete the forum cache and the browser one... Nothing changed to me T.T still black T.T any ideas?  :'(

EDIT: Happens only with admin profile. Guests and normal users are ok (I feel trolled :O )

EDIT2: Logging in and out fixed it. Now i feel seriously WT*  :o :-X

I guess i can just say thanks for the mod and enjoy my  :o face at the monitor
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

margarett

Don't you just love computers? :P
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

Ninja ZX-10RR

I used to be nerd some time ago but when my xbox, my old computer, my nintendo, my telephone, my mp3 player, my mouse and other stuff broke all in a row for no reason i just stopped being it .-.
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

margarett

Please open a topic in Graphics and Templates for that ;) It should be doable, of course ;)
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

1985

Hi ,

This message show on my site.

"Unknown column 'b.global_topics' in 'field list'"

Advertisement: