Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: margarett on March 27, 2009, 10:15:33 AM

Title: Global Topics
Post by: margarett on March 27, 2009, 10:15:33 AM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1723)


Global Topics

This mod allows you to create Global Topics.

Global Topics are shown:
- in all boards where this feature is enabled
- only in the first page of the list of messages (MessageIndex)
- before any other topic, including sticky topics
- in Unread Topics / Unread Replies

Original author: onepiece (http://www.simplemachines.org/community/index.php?action=profile;u=198898)

The included file global_post.gif is an image from FamFamFam Silk Icons (http://www.famfamfam.com/lab/icons/silk). Silk Icons are licensed under Creative Commons Attribution 2.5 License (http://creativecommons.org/licenses/by/2.5/)

Languages:
     - English
     - English UTF8

Changelog
Code: [Select]
Version 2.2 // 17-05-2014
================================================================================
! Fixed bug: Global Topics were showing in boards not selected to show them
+ You cannot "global" a topic in a board not selected to show Global Topics

Version 2.1 // 07-05-2014
================================================================================
+ Global Topics are also identified in Unread Topics/Replies
! This also fixes an "undefined index" being generated in those actions
! Fixed bug with wrong order after "unglobal" a topic (thanks @onepiece)

Version 2.0 // 29-04-2014
================================================================================
+ Take over by margarett
! Fixed to work with 2.0+

Legend:
--------------------------------------------------------------------------------
 ! Minor change or bugfix.
 + Feature addition or improvement.
 - Feature or option removal.

(http://i.creativecommons.org/l/by/3.0/88x31.png)
This mod is licensed under Creative Commons Attribution 3.0 Unported License (http://creativecommons.org/licenses/by/3.0/)
Title: Re: Global Topics
Post by: franklinrony on March 27, 2009, 01:42:04 PM
woo, marvelous good mod :) congrats. i need to my forum
Title: Re: Global Topics
Post by: perro88 on March 27, 2009, 02:22:54 PM
Nice idea for a mod. thanks
Title: Re: Global Topics
Post by: gourav on March 31, 2009, 04:55:00 AM
Hey really a good mod but there is no tutorial tht how to make it work?
i am not able to find it anywhere in admin menu after installtion in my 2 RC1 ??
Title: Re: Global Topics
Post by: onepiece on March 31, 2009, 06:49:47 AM
You just have to make topics global, like you are setting them as sticky. You should be able to see the button in the moderator buttons area when you are viewing a topic.

If you want to hide global topics in some boards, you can disable the feature from Admin > Boards > modify (for the board) and you should see the related setting there.
Title: Re: Global Topics
Post by: gourav on March 31, 2009, 12:11:02 PM
Yes i already checked it but How to make a topic Global topic???

When i created a new topic or modified a topic in a board where
global topics is enabled there are only this options ???

 Notify me of replies.    Lock this topic.
 Return to this topic.    Sticky this topic.
 Don't use smileys.    Move this topic.
 Announce topic.
Title: Re: Global Topics
Post by: onepiece on April 01, 2009, 05:21:03 AM
You should be able to see the button on Message Display screen. If you are not seeing it, you probably are using a custom theme. Using the manual installation instructions on the Mod Site, apply the theme edits to your custom theme files.
Title: Re: Global Topics
Post by: gourav on April 02, 2009, 02:38:58 AM
You should be able to see the button on Message Display screen. If you are not seeing it, you probably are using a custom theme. Using the manual installation instructions on the Mod Site, apply the theme edits to your custom theme files.
No bro i am using default core theme,
I checked in moderator section,
Section of new topic and and all other things
but there is none on GLOBAL TOPIc ??
can you please please post a screen shot that where to makit
enable?
Title: Re: Global Topics
Post by: SFF Forum on April 02, 2009, 03:24:21 AM
Quote
Nice idea for a mod. thanks

But it noly for 2.0RC,can you update for SMF1.1.8? :)
Title: Re: Global Topics
Post by: onepiece on April 03, 2009, 09:42:57 AM
can you please please post a screen shot that where to makit
enable?

Attached a screen shot.

Quote
Nice idea for a mod. thanks

But it noly for 2.0RC,can you update for SMF1.1.8? :)

Sorry, I'm not planning to update it for SMF 1.1 versions. There are couple of similar mods you can use for your version.
Title: Re: Global Topics
Post by: M-DVD on April 03, 2009, 11:25:30 PM
Good, this MOD is very usefull  :D
Title: Re: Global Topics
Post by: gourav on April 04, 2009, 07:04:41 AM
Thanks Tenma for the screenshot :)
Please add this screen shot in MOd area so that users can know it easily :)

Indeed a great mod that reminds the Announcement topic of PHPBB ,, But as a suggestion try to make a space between Global topic and normal topics...
Title: Re: Global Topics
Post by: - Lawrence - on April 04, 2009, 07:25:03 AM
Wow, thanks. I was looking for a mod that did this :D.
Title: Re: Global Topics
Post by: Lamarck on April 14, 2009, 07:40:33 AM
Very nice mod.I have a problem: I can't change the background color of global topics.I installed it on my custom theme,and changed the background-color for global on style.css.However,nothing happens.

In messageindex.template.php:

Quote
// Calculate the colour class of the topic.
         if ($context['can_approve_posts'] && $topic['unapproved_posts'])
            $color_class = $topic['approved'] ? 'approvebg' : 'approvetbg';
elseif ($topic['is_global'])
$color_class = 'global';

         else
            $colour_class = !empty($settings['separate_sticky_lock']) && $topic['is_sticky'] ? 'windowbg6' : 'windowbg';



Is this right? any help,please?

Title: Re: Global Topics
Post by: onepiece on April 14, 2009, 08:19:22 AM
Try doing a hard refresh on the page. (Ctrl + F5)
Title: Re: Global Topics
Post by: Lamarck on April 14, 2009, 08:51:37 AM
Nothing,still the same.
Title: Re: Global Topics
Post by: onepiece on April 14, 2009, 09:11:21 AM
Attach your style.css file here.
Title: Re: Global Topics
Post by: Lamarck on April 14, 2009, 09:24:56 AM
Attached ^^.Thanks.

EDIT: ok,solved.I changed "color_class" to "colour_class" and now works for me.
Title: Re: Global Topics
Post by: gourav on April 26, 2009, 07:35:56 AM
@Tenma There is a bug in these version?
I am using SMF2 RC1 , and Global topics are visibal
Even on those borads where i unchecked
them through Admin menu??Please fix it..
Title: Re: Global Topics
Post by: onepiece on April 29, 2009, 04:22:33 AM
Would you provide me a link to the topic and the board as an example?
Title: Re: Global Topics
Post by: gourav on April 29, 2009, 08:05:57 AM
@Tenma

Normal board with Global topic enabled
http://gstek.info/forum/qs-answers-and-debates-!!/

and here is secret board [ visible only to admin and moderators ]
on which i did unchekced the Global topics but its still there..
http://gstek.info/forum/recycle-bin/

Btw just now i noticed that boards where i disabled the
Global topics is not having "global.png" icon ???
Title: Re: Global Topics
Post by: ngoclanbaby86 on June 05, 2009, 06:22:09 AM
I need somebody help me for my forum version 1.1.9.
why not support for older version same 1.1.9 ?
Title: Re: Global Topics
Post by: wladymeer on June 22, 2009, 06:47:19 PM
Nice addition - did you maybe consider of making "category topic"? Meaning that some topic appears in every board under specified categories?
Title: Re: Global Topics
Post by: sitsiritsit on September 23, 2009, 10:43:06 AM
tried to install this in my smf 1.1.10 however seems not supported.

is there any updates on this ?

here is the error:

An Error Has Occurred!
The file you are uploading already exists on the server. Please delete it first then try again.
Title: Re: Global Topics
Post by: MATTEK on November 24, 2009, 10:26:49 PM
I need this for RC2
Agreed.
Title: Re: Global Topics
Post by: juliegreen on December 04, 2009, 09:37:17 AM
i need this for rc2 too
Title: Re: Global Topics
Post by: MoreBloodWine on December 09, 2009, 01:11:08 PM
I was going over the XML for this when I noticed it wouldnt install on 1.1.11 and it seems that this mod is made for 2.0 specifcally. Any chance to get a copy of this for 1.1.11 or will adding 1.1.11 to the XML's install and uninstall lines allow it to work for me.
Title: Re: Global Topics
Post by: LP-san on December 14, 2009, 10:08:26 AM
i need this for rc2 too

+1 need it
Title: Re: Global Topics
Post by: karanima on January 02, 2010, 08:22:16 AM
+100
Title: Re: Global Topics
Post by: tanshin on February 12, 2010, 04:36:55 PM
Any word on if this will be updated for RC2?
Title: Re: Global Topics
Post by: gourav on June 05, 2010, 02:16:11 PM
This is an Excellent mode , please update it to RC3
Title: Re: Global Topics
Post by: MoreBloodWine on August 30, 2010, 07:06:43 AM
I was going over the XML for this when I noticed it wouldnt install on 1.1.11 and it seems that this mod is made for 2.0 specifcally. Any chance to get a copy of this for 1.1.11 or will adding 1.1.11 to the XML's install and uninstall lines allow it to work for me.
;-(
Title: Re: Global Topics
Post by: ephobe on December 17, 2010, 01:52:13 PM
I was going over the XML for this when I noticed it wouldnt install on 1.1.11 and it seems that this mod is made for 2.0 specifcally. Any chance to get a copy of this for 1.1.11 or will adding 1.1.11 to the XML's install and uninstall lines allow it to work for me.
;-(

I would like this for 1.1.12 too if possible? Any help?
Title: Re: Global Topics
Post by: DSystem on April 30, 2014, 09:52:45 PM
Great Mod. Another one that should be incorporated in the next version of SMF.

Brazil Portuguese translation:

Code: [Select]
<file name="$languagedir/Modifications.portuguese_brazilian.php">
<operation>
<search position="end" />
<add><![CDATA[
$txt['global_topic'] = 'Tópico global';
$txt['not_global_topic'] = 'Tópico não Global';
$txt['global_topics_board'] = 'Ativar tópicos globais';
$txt['global_topics_board_desc'] = 'Exibir os tópicos globais nesta área';
$txt['modlog_ac_global'] = 'Feito global &quot;{topic}&quot;';
$txt['modlog_ac_unglobal'] = 'Não fez global &quot;{topic}&quot;';
$txt['permissionname_make_global'] = 'Fazer tópicos globais';
$txt['permissionhelp_solve_topic'] = 'Esta permissão permite ao usuário fazer tópicos globais.';
$txt['cannot_make_global'] = 'Você não pode fazer tópicos global.';
$txt['wireless_display_global'] = 'Global';
$txt['wireless_display_not_global'] = 'Não Global';
]]></add>
</operation>
</file>
<file name="$languagedir/Modifications.portuguese_brazilian-utf8.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
$txt['global_topic'] = 'T&oacute;pico global';
$txt['not_global_topic'] = 'T&oacute;pico n&atilde;o Global';
$txt['global_topics_board'] = 'Ativar t&oacute;picos globais';
$txt['global_topics_board_desc'] = 'Exibir os t&oacute;picos globais nesta &aacute;rea';
$txt['modlog_ac_global'] = 'Feito global &quot;{topic}&quot;';
$txt['modlog_ac_unglobal'] = 'N&atilde;o fez global &quot;{topic}&quot;';
$txt['permissionname_make_global'] = 'Fazer t&oacute;picos globais';
$txt['permissionhelp_solve_topic'] = 'Esta permiss&atilde;o permite ao usu&aacute;rio fazer t&oacute;picos globais.';
$txt['cannot_make_global'] = 'Voc&ecirc; n&atilde;o pode fazer t&oacute;picos global.';
$txt['wireless_display_global'] = 'Global';
$txt['wireless_display_not_global'] = 'N&atilde;o Global';
]]></add>
</operation>
</file>
Title: Re: Global Topics
Post by: littlenicki on May 01, 2014, 10:21:53 AM
Hello, is there also a SMF 1.1 Version of this mod?
Title: Re: Global Topics
Post by: DSystem on May 01, 2014, 10:25:54 AM
SMF 1.1 should be available only in museums. ;)

I'm looking for the version of this mod for SMF version 2.1  ;D
Title: Re: Global Topics
Post by: margarett on May 01, 2014, 10:33:54 AM
Hello, is there also a SMF 1.1 Version of this mod?
I'm sorry, I won't do it. I don't use 1.1.x anymore, 1.1.x will be EOL shorter than later and the work it requires simply won't worth it. Anyway, the mod has now a permissive license (since takeover) so if someone wants to fork it and adapt it, feel free to do it...
Title: Re: Global Topics
Post by: DSystem on May 04, 2014, 12:24:10 PM
Today I put this MOD to work and this appearing the following errors in the logs

Code: [Select]
http://eletronicabr.com/notebooks/2/notebook-cce-iron-345bplus-placa-h48-h49/24252/
Undefined index: is_global
Arquivo: /home/forumbr/domains/eletronicabr.com/public_html/Sources/Subs.php
Linha: 3200
Title: Re: Global Topics
Post by: margarett on May 04, 2014, 05:10:30 PM
Can you attach Subs.php?
Title: Re: Global Topics
Post by: DSystem on May 04, 2014, 05:21:01 PM
Thanks for the attention.

In this annex the requested file.

Title: Re: Global Topics
Post by: margarett on May 04, 2014, 05:34:42 PM
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:
Code: [Select]
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)
Title: Re: Global Topics
Post by: DSystem on May 04, 2014, 05:51:11 PM
Tested. Worked perfectly


Thank you very much. (http://eletronicabr.com/Smileys/blue/kiss.gif)
Title: Re: Global Topics
Post by: Westwegoman on May 05, 2014, 10:12:25 AM
I get same error in my error log.
Code: [Select]
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:
Code: [Select]
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.
Title: Re: Global Topics
Post by: margarett on May 05, 2014, 10:59:05 AM
When does that error show up?
Can you relate a specific topic with this error? (eg, a sticky, locked, etc)

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.
Title: Re: Global Topics
Post by: Westwegoman on May 05, 2014, 11:02:58 AM
When does that error show up?
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.
Title: Re: Global Topics
Post by: Westwegoman on May 05, 2014, 02:44:32 PM
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.

Code: [Select]
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.
Title: Re: Global Topics
Post by: onepiece on May 05, 2014, 03:36:50 PM
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:

Code: [Select]
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.
Title: Re: Global Topics
Post by: Pipke on May 06, 2014, 02:40:02 PM
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?
Title: Re: Global Topics
Post by: margarett on May 06, 2014, 03:18:41 PM
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 :(
Title: Re: Global Topics
Post by: margarett on May 07, 2014, 06:20:00 PM
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.
(http://www.simplemachines.org/community/index.php?action=dlattach;topic=301482.0;attach=231119;image)

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 :)

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

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

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 ;)
Title: Re: Global Topics
Post by: MotRude on May 07, 2014, 09:05:12 PM
Thank you for this mod...Great work! (http://www.cruetube.com/Forum/Smileys/akyhne/th_thumbup.gif)
Title: Re: Global Topics
Post by: Westwegoman on May 09, 2014, 12:44:39 AM
Installed the updated version. Working great.

Thanks!
Title: Re: Global Topics
Post by: NoPasaran on May 10, 2014, 04:13:03 PM

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


I installed the new version but did not improve.
Title: Re: Global Topics
Post by: margarett on May 10, 2014, 06:01:36 PM
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
Title: Re: Global Topics
Post by: NoPasaran on May 11, 2014, 06:45:11 AM
ok thanks :)

it fix
Title: Re: Global Topics
Post by: Westwegoman on May 11, 2014, 05:09:40 PM
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.
Title: Re: Global Topics
Post by: Pipke on May 14, 2014, 01:41:52 PM
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.

Title: Re: Global Topics
Post by: margarett on May 14, 2014, 01:48:10 PM
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...
Title: Re: Global Topics
Post by: Westwegoman on May 14, 2014, 03:01:15 PM
No problem. I know all to much how the craziness can get at the job.
Title: Re: Global Topics
Post by: margarett on May 16, 2014, 08:55:01 PM
Both problems now fixed ;)
Title: Re: Global Topics
Post by: Westwegoman on May 16, 2014, 09:08:16 PM
Awesome!

(http://www.bayoustatefishing.com/community/Smileys/default/ThankYou.gif)
Title: Re: Global Topics
Post by: Pipke on May 17, 2014, 07:48:38 AM
thx great work.
Title: Re: Global Topics
Post by: NekoJonez on May 17, 2014, 09:48:40 AM
So, I got the error with the undefined "is_global" thingy.
Also, the images are broken.
Title: Re: Global Topics
Post by: margarett on May 17, 2014, 10:10:55 AM
Uh? :o now that's strange. I have to check, maybe I messed with older files? (Not likely, though...)
Title: Re: Global Topics
Post by: margarett on May 19, 2014, 09:35:46 AM
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?
Title: Re: Global Topics
Post by: NekoJonez on May 19, 2014, 11:14:55 AM
The one for the stickies. And I get the undefined is_global error in the "Last replies" thingies.
Title: Re: Global Topics
Post by: margarett on May 19, 2014, 11:21:27 AM
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?
Title: Re: Global Topics
Post by: margarett on May 19, 2014, 01:46:00 PM
I'm sorry, but not really...

Global topics have full priority. This means that a global topic can not request the "global_locked" icon:
Code: [Select]
//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...
Title: Re: Global Topics
Post by: margarett on May 19, 2014, 02:23:20 PM
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:
Code: [Select]
<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"...
Title: Re: Global Topics
Post by: margarett on May 19, 2014, 02:50:02 PM
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 ;)
Title: Re: Global Topics
Post by: margarett on May 19, 2014, 03:52:26 PM
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...
Title: Re: Global Topics
Post by: margarett on May 19, 2014, 04:31:22 PM
I also don't have that :(
(If I did, I could easily make a 2.0 package again)
/me 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:
Code: [Select]
ALTER TABLE smf_boards CHANGE global_topics global_topics TINYINT( 4 ) NOT NULL DEFAULT '0';
Code: [Select]
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:
Code: [Select]
$topic_context['class'] = 'hot';
elseif ($topic_context['is_global'])
$topic_context['class'] = 'global';
Remove this bit:
Code: [Select]
elseif ($topic_context['is_global'])
$topic_context['class'] = 'global';
A bit below, find this:
Code: [Select]
// This is so old themes will still work.
$topic_context['extended_class'] = &$topic_context['class'];
Before, add this:
Code: [Select]
//Global Topics have full priority
if (!empty($topic_context['is_global']))
$topic_context['class'] = 'global';

Sources/MessageIndex.php, find this:
Code: [Select]
if (empty($_REQUEST['start']))Replace with this:
Code: [Select]
if (empty($_REQUEST['start']) && !empty($board_info['global_topics']))Sources/Display.php
Find:
Code: [Select]
// Cleanup all the permissions with extra stuff...Add after:
Code: [Select]
$context['can_global'] &= !empty($board_info['global_topics']);Sources/Recent.php
Find:
Code: [Select]
t.num_replies, t.num_views, ms.id_member AS id_first_member, ml.id_member AS id_last_member,Add after (inline)
Code: [Select]
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...
Title: Re: Global Topics
Post by: margarett on May 19, 2014, 06:45:44 PM
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...
Title: Re: Global Topics
Post by: Ninja ZX-10RR on May 19, 2014, 06:58:33 PM
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
Title: Re: Global Topics
Post by: margarett on May 19, 2014, 07:11:10 PM
Thanks ;)
Actually it looks good to me... I see the global topic with the light blue background...
Title: Re: Global Topics
Post by: Ninja ZX-10RR on May 19, 2014, 07:15:10 PM
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
Title: Re: Global Topics
Post by: margarett on May 19, 2014, 07:26:11 PM
Don't you just love computers? :P
Title: Re: Global Topics
Post by: Ninja ZX-10RR on May 19, 2014, 07:41:12 PM
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 .-.
Title: Re: Global Topics
Post by: margarett on May 20, 2014, 02:38:19 AM
Please open a topic in Graphics and Templates for that ;) It should be doable, of course ;)
Title: Re: Global Topics
Post by: 1985 on June 15, 2014, 10:20:31 AM
Hi ,

This message show on my site.

"Unknown column 'b.global_topics' in 'field list'"
Title: Re: Global Topics
Post by: Ninja ZX-10RR on June 15, 2014, 11:58:32 AM
Hi ,

This message show on my site.

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

Please tell margarett in which file it happens (a screenshot of your error log would be a good thing), when it happens, if it happens with all users, if you have a custom theme (and which one), if the installation was all successfull or not and also which version of SMF you are using.
Title: Re: Global Topics
Post by: 1985 on June 15, 2014, 12:41:15 PM
Hi ,

This message show on my site.

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

Please tell margarett in which file it happens (a screenshot of your error log would be a good thing), when it happens, if it happens with all users, if you have a custom theme (and which one), if the installation was all successfull or not and also which version of SMF you are using.

It' s my fault. I didn't automatic install this mod . But I fix my site already.
And now I don't know how to post the global topic.
Title: Re: Global Topics
Post by: Ninja ZX-10RR on June 15, 2014, 12:45:21 PM
See the screenshots in here --> http://custom.simplemachines.org/mods/index.php?mod=1723
And also you just have to edit a post and you will find a button for it if the permissions are set properly ;)
Title: Re: Global Topics
Post by: 1985 on June 15, 2014, 12:59:39 PM
I set it already. But I just don't know how to post. And then I find the button below the topic. Thank for chat with me.
Title: Re: Global Topics
Post by: Ninja ZX-10RR on June 15, 2014, 01:46:25 PM
Just post as any other post and click on that button ;) it should set the topic as global and make it first in each board of your forum :)
Title: Re: Global Topics
Post by: RSI on June 16, 2014, 01:23:24 PM
Hello, I found an issue with this mod.

When you make a topic global it adds a "1" in the is_global column within the smf_topics table in the database. Then if you go back and make the topic not global is changes that value to "0". The problem is it needs to make it a blank again and not a "0"

Once you go back and make a topic not global and it changes the value to "0" the forum sort order is messed up and that topic always stays at the top of the forum. I had to go into my db manually and remove the "0" to correct those topics.

Is there a way to manually edit the modification code in my existing install to correct the problem?

Thanks
Title: Re: Global Topics
Post by: Arantor on June 16, 2014, 02:41:38 PM
Thing is, is_global is a signed tinyint, that means its range of values is numbers only from -128 to +127. If you 'remove the 0' as you put it, all it's going to do is become 0 again... (the column is defined as NOT NULL, or should be, so it *will* be a number)
Title: Re: Global Topics
Post by: RSI on June 16, 2014, 02:57:01 PM
Thing is, is_global is a signed tinyint, that means its range of values is numbers only from -128 to +127. If you 'remove the 0' as you put it, all it's going to do is become 0 again... (the column is defined as NOT NULL, or should be, so it *will* be a number)

But.., that's not what is happening. When you create a topic the value in the is_global column is blank by default. No "0" or "1" It does not create that value until you make a topic global. As soon as I remove the "0" is corrects the forum sort order.

I understand what you are saying, but this mod does create the problem nevertheless. If you go back and make any topic not global that topic will just stay at the top of the forum for life.
Title: Re: Global Topics
Post by: Arantor on June 16, 2014, 03:01:28 PM
I just created a topic with this mod installed, and it defaulted to 0 in the database. If you don't specify it in the PHP, it's going to be set to the table default which is 0.

Dude, I do not know what you're doing but I physically cannot put any value other than a number into that column.

Also, the mod works fine for me.
Title: Re: Global Topics
Post by: margarett on June 16, 2014, 04:26:21 PM
Check that you're using the latest version. This was in fact an issue in previous version but it was fixed meanwhile.
Title: Re: Global Topics
Post by: RSI on June 16, 2014, 05:08:52 PM
Attached below is a screenshot of my smf_topics table and the is_global column is blank in each row. If I create a global topic it makes the value in the column a "1" If I go back and make it not global it changes it to "0" I have to make it blank again to correct the sort order.

I no longer know which version I have installed. Backup files have been delete since then. I believe it was the second one uploaded a few weeks ago right after the first initial update. If it was corrected can you please tell me which file to check. I can parse it for v2.0.7 via the mod's page and see what's missing, etc.
Title: Re: Global Topics
Post by: margarett on June 16, 2014, 05:12:07 PM
Yes, you are not running the latest version. Please uninstall that (remember to choose to remove associated data) and install the newest one from the modsite.
If you check the latest posts, that same issue was discussed ;)

Edit: reference http://www.simplemachines.org/community/index.php?topic=301482.msg3693935#msg3693935
Title: Re: Global Topics
Post by: RSI on June 16, 2014, 05:17:49 PM
Yes, you are not running the latest version. Please uninstall that (remember to choose to remove associated data) and install the newest one from the modsite.
If you check the latest posts, that same issue was discussed ;)

I cannot auto uninstall it. Those backup files have been deleted and other mods have been installed since. I must do it manually.

I just need to know where to look, which file(s). I can run a query to make all of the blanks "0", but that's not going to help if I create standard topics that still leave the rows blank.

Thanks
Title: Re: Global Topics
Post by: margarett on June 16, 2014, 05:23:54 PM
Yup, one of the latest issues was exactly the same :(
http://www.simplemachines.org/community/index.php?topic=301482.msg3698052#msg3698052
Title: Re: Global Topics
Post by: RSI on June 16, 2014, 08:39:25 PM
Yup, one of the latest issues was exactly the same :(
http://www.simplemachines.org/community/index.php?topic=301482.msg3698052#msg3698052

Surprisingly all of the code in each of the pages was up to date so I must have the latest version already installed. I ran the queries and it corrected the problem. The is_global column must have gotten screwed up and defaulted back when I ran the repair_settings.php tool about 2 weeks ago. I have a few of my own custom mods installed and I had an issue one day and had to remove all of the hooks then reinstall them.

Just out of curiosity why is it that several of the mods I've looked at on the mod page have been updated several times, but only one file exists for download? If you guys are making changes and even due to a mistake you should really leave all of the files there even with the mistakes so people can go back and figure out what to do. Without a trail backwards its often hard to correct problems.
Title: Re: Global Topics
Post by: Ninja ZX-10RR on June 16, 2014, 08:44:54 PM
So basically he wants to see the changes log...
Title: Re: Global Topics
Post by: RSI on June 16, 2014, 09:12:15 PM
So basically he wants to see the changes log...

No, what I mean is…
   
GlobalTopics_v1.0.0.zip
GlobalTopics_v1.0.1.zip
GlobalTopics_v1.0.2.zip

or

GlobalTopics_v1.0.0.zip
GlobalTopics_v1.0.1a.zip
GlobalTopics_v1.0.1b.zip

etc.

It's just an observation, but I've noticed a lot of people are not doing that and are just overwriting the same file and all of the previous versions are gone :(
Title: Re: Global Topics
Post by: Arantor on June 16, 2014, 09:13:37 PM
Yes because experience teaches us that users invariably just click the first link on the list, which is usually the old one.

I would love to know how come you don't have the old version... since the zip file should be in your Packages folder, or failing that, something useful should be in Packages/backups which should include a backup before any mod installation/uninstallation.
Title: Re: Global Topics
Post by: RSI on June 16, 2014, 09:32:23 PM
Yes because experience teaches us that users invariably just click the first link on the list, which is usually the old one.

I would love to know how come you don't have the old version... since the zip file should be in your Packages folder, or failing that, something useful should be in Packages/backups which should include a backup before any mod installation/uninstallation.

Well, many of the mods do have several versions and it comes up with the radio button already selected for the latest version, but I do understand its not a full proof solution. Maybe having an archive link that would bring up the older files instead or something.

I only have a few select mods on my board some of which I found here and the rest are my own mods so once everything is working properly I really have no reason to keep outdated versions. I guess I should probably rethink though and just keep a special archive folder on the server for everything I have installed old or new.
Title: Re: Global Topics
Post by: Arantor on June 16, 2014, 09:33:26 PM
That requires major rewriting of the software in question and that's been attempted at least 3 times over the last 5 years and not happened yet.

I still do not understand why you don't have the mods you installed in the packages folder on your site.
Title: Re: Global Topics
Post by: Ninja ZX-10RR on June 16, 2014, 09:48:51 PM
Wew so fast replies I am working and didn't see them.

So basically he wants to see the changes log...

No, what I mean is…
   
GlobalTopics_v1.0.0.zip
GlobalTopics_v1.0.1.zip
GlobalTopics_v1.0.2.zip

or

GlobalTopics_v1.0.0.zip
GlobalTopics_v1.0.1a.zip
GlobalTopics_v1.0.1b.zip

etc.

It's just an observation, but I've noticed a lot of people are not doing that and are just overwriting the same file and all of the previous versions are gone :(
As regards this yes but dude seeing each edit would have been even more useful as you would have been able to verify it directly from the code itself ;)



Yes because experience teaches us that users invariably just click the first link on the list, which is usually the old one.
If someone wants to be a dumbass he will be despite your efforts to tell him not to be :P And I learnt this from my ex-gf.

I would love to know how come you don't have the old version... since the zip file should be in your Packages folder, or failing that, something useful should be in Packages/backups which should include a backup before any mod installation/uninstallation.
Me too. I usually have a mess in my download folder and don't delete mods packages after several days of testing ;)

That requires major rewriting of the software in question and that's been attempted at least 3 times over the last 5 years and not happened yet.
Major overwriting of what? I didn't get that. You were meaning the radio buttons list of the mod itself or..?

I still do not understand why you don't have the mods you installed in the packages folder on your site.
Again me too.
Title: Re: Global Topics
Post by: Arantor on June 16, 2014, 09:51:51 PM
Quote
Major overwriting of what? I didn't get that. You were meaning the radio buttons list of the mod itself or..?

There's been at least three campaigns to revamp the entire mod site over the last 5 years, that still hasn't happened.
Title: Re: Global Topics
Post by: Ninja ZX-10RR on June 16, 2014, 09:55:48 PM
:O to fix what? It seems pretty much anti-noob and user friendly to me...
Title: Re: Global Topics
Post by: Media-Bay on August 18, 2014, 06:34:58 AM
Is there still support and help with this nod as i have installed with no problems but the tick box to make it a global topic when posting does not appear.
Title: Re: Global Topics
Post by: Ninja ZX-10RR on August 18, 2014, 09:13:25 AM
Is there still support and help with this nod as i have installed with no problems but the tick box to make it a global topic when posting does not appear.
Be sure to set the permissions properly ;) (the membergroup must have the permission to make a topic global) if that doesn't work try to provide margarett more details about it since you didn't provide anything useful actually. (useful=smf version, mods list, custom theme link if you are using one, errors in error log)
Title: Re: Global Topics
Post by: Media-Bay on August 18, 2014, 09:20:18 AM
Hey

All permission are set in user-groups and ticked. i a currenlty using smf 2.0.8 with a custom theme of CleanTek by Crip.

List of other mods installed...

Country Flags    2.1    
Contact Page    3.2    
Ad Managment    3.2    
Global Topics    2.2    
Enhanced PM System    2.0    
Like Posts    1.5    ]
Order Custom Profile Fields    1.1.1    
Search Topic And Boards Button    1.0

I have tried to install also buy script with no luck..

Everything else appears OK but in creating new topic no tick box for making it global 
Title: Re: Global Topics
Post by: margarett on August 18, 2014, 02:00:39 PM
There is no option there, actually. You first create the topic, then you enter it again and in the lower buttons you'll find the option to make it global ;)
Title: Re: Global Topics
Post by: Media-Bay on August 18, 2014, 02:25:08 PM
lol

sorry i didnt see that lol

cheers mate
Title: Re: Global Topics
Post by: Ninja ZX-10RR on August 19, 2014, 04:01:14 PM
Howdy, sorry I misunderstood that >_<
Title: Re: Global Topics
Post by: Westwegoman on September 10, 2014, 04:25:30 PM
Just noticed that global topics that are locked, don't show as locked.

In other words, they actually get locked but the "lock" doesn't show on the message index.
Title: Re: Global Topics
Post by: margarett on September 10, 2014, 04:42:33 PM
Yes, there is just one icon for global topics... It would require multiple icons to be available, and I suck at graphics :P
Title: Re: Global Topics
Post by: Pipke on September 10, 2014, 04:50:06 PM
Yes, there is just one icon for global topics... It would require multiple icons to be available, and I suck at graphics :P

Does SMF have an PSD file for the orginal icons they made for the topic icons somewhere, ill be happy to make them then for your mod?
Title: Re: Global Topics
Post by: Arantor on September 10, 2014, 04:53:41 PM
No, seeing how they were made as GIFs years and years ago. You could make one out of the images as they currently are now though if you wanted to try it.
Title: Re: Global Topics
Post by: Westwegoman on September 10, 2014, 05:38:32 PM
Yes, there is just one icon for global topics... It would require multiple icons to be available, and I suck at graphics :P
Not a problem. Just didn't know if it was maybe something that was over looked.
Title: Re: Global Topics
Post by: tantraonline on September 18, 2014, 03:59:53 AM
I use the Astonished theme and installed this but I can't seem to make this mod work. I already installed it with the latest version.

Help please.
Title: Re: Global Topics
Post by: margarett on September 18, 2014, 08:13:44 PM
I installed that theme here and the MOD seems to work fine...
Are you sure you selected the theme when installing the MOD?

Look at attached images.
Title: Re: Global Topics
Post by: tantraonline on September 19, 2014, 08:30:24 AM
I installed that theme here and the MOD seems to work fine...
Are you sure you selected the theme when installing the MOD?

Look at attached images.

I didn't notice that I have to select a theme when installing it? Do I have to uninstall it?
Title: Re: Global Topics
Post by: tantraonline on September 19, 2014, 08:57:52 AM
I sorted it out now I want to know how can I make this global topic on top?
Title: Re: Global Topics
Post by: margarett on September 19, 2014, 09:01:11 AM
It is on top by default. Check the first 2 images of my previous post ;)
If it's not working for you, then please printscreen the behavior you're having.
Title: Re: Global Topics
Post by: player.samp on November 03, 2014, 02:29:58 PM
When I set a topic global, I can only see the board where the topic was posted.

In each other board, when I try to access it I get the following error:

Code: [Select]

An Error Has Occurred!
The database value you're trying to insert does not exist: is_global

Title: Re: Global Topics
Post by: margarett on November 03, 2014, 05:59:46 PM
Can't really reproduce it....

Didn't you get any error at install that you ignored, maybe?
Title: Re: Global Topics
Post by: player.samp on November 05, 2014, 11:37:13 AM
No error was shown when I installed the package. I will check the bug as soon as I can when the forum is online again because currently it got other problem.
Title: Re: Global Topics
Post by: fastlight on May 28, 2015, 02:43:04 AM
Hi,

I tried using this mod with 2.0.10 (patched from 2.0.9). It seems to work except that it's changing the background color of part of the screen.  Can you help?  Is there an updated version or something else I should try?
Title: Re: Global Topics
Post by: margarett on May 28, 2015, 03:24:15 AM
Hi and welcome to sm.org ;)

Can you post a print screen of the behavior you described?
Title: Re: Global Topics
Post by: zurgenaboy on November 17, 2015, 07:21:36 PM
Have searched and found 7 pages on Globaltopics mod and read all 7, so if this is in the wrong place, please move. (last post was older than 120 days)
Using smf 2.0.11
default curve theme
I installed above mod and got this error when clicking on any board:
Parse error: syntax error, unexpected 'elseif' (T_ELSEIF) in smf/Themes/default/MessageIndex.template.php on line 301
(no install errors)

Uninstalled the mod and everything back to working normally.
(no uninstall errors)

Installed again after midnight(only guests around) with the same result, so uninstalled again. (no checkbox to undo d/b changes)

MessageIndex.template.php  (attached)   Any solution to let me install a workable mod please.
Title: Re: Global Topics
Post by: margarett on November 17, 2015, 07:42:34 PM
The edit to MessageIndex.template.php isn't in the file and line 301 is NOT an elseif... Are you sure you're giving us the correct file?
Title: Re: Global Topics
Post by: zurgenaboy on November 17, 2015, 07:51:26 PM
I looked at line 301 and noticed that the global code started at like 302, but did not question that.
I downloaded themes/default/MessageIndex.template.php
as listed in the error thrown up.
Is there another one elsewhere?

edit:
Here is the backup file from the package backups
Title: Re: Global Topics
Post by: zurgenaboy on November 17, 2015, 08:13:09 PM
If its any help, I still have the backup file before I installed the mod for the first time.
(remember that I installed it twice.)
Title: Re: Global Topics
Post by: margarett on November 17, 2015, 08:16:50 PM
You have another MOD conflicting with this which produces that error.
Original MessageIndex.template.php has:
Code: [Select]
// Is this topic pending approval, or does it have any posts pending approval?
if ($context['can_approve_posts'] && $topic['unapproved_posts'])
$color_class = !$topic['approved'] ? 'approvetbg' : 'approvebg';
// We start with locked and sticky topics.
elseif ($topic['is_sticky'] && $topic['is_locked'])
$color_class = 'stickybg locked_sticky';

Your MessageIndex.template.php has:
Code: [Select]
// Is this topic pending approval, or does it have any posts pending approval?
if ($context['can_approve_posts'] && $topic['unapproved_posts']) {
$color_class = !$topic['approved'] ? 'approvetbg' : 'approvebg';
$hover_class = !$topic['approved'] ? 'approvetbg' : 'approvebg'; }
// We start with locked and sticky topics.
elseif ($topic['is_sticky'] && $topic['is_locked']) {
$color_class = 'stickybg locked_sticky';
$hover_class = 'stickybg'; }

My MOD adds an elseif before the second comment (but uses the code line above as the search point), which breaks the PHP code because of that "foreign code"

Around line 301, you need to have something like:
Code: [Select]
// Is this topic pending approval, or does it have any posts pending approval?
if ($context['can_approve_posts'] && $topic['unapproved_posts']) {
$color_class = !$topic['approved'] ? 'approvetbg' : 'approvebg';
$hover_class = !$topic['approved'] ? 'approvetbg' : 'approvebg'; }
elseif ($topic['is_global']) {
$color_class = 'global';
}
// We start with locked and sticky topics.
elseif ($topic['is_sticky'] && $topic['is_locked']) {
$color_class = 'stickybg locked_sticky';
$hover_class = 'stickybg'; }
You might want to add something for the "$hover_class" in it too...
Title: Re: Global Topics
Post by: zurgenaboy on November 17, 2015, 08:25:28 PM
I am not happy with changing code, its been years since I was a programmer.
Will it take up much time to make the required changes?
Title: Re: Global Topics
Post by: zurgenaboy on November 17, 2015, 08:30:03 PM
Or shall I just uninstall the board hover mod?   

I really appreciate your help and advice Margarett
Title: Re: Global Topics
Post by: margarett on November 17, 2015, 08:45:00 PM
Yeah, it's one of the issues of MODs, when they conflict. If you don't want to edit code, you definitely need to choose one over the other... Do note, I already gave you the code you need to fix and explained why ;)

Title: Re: Global Topics
Post by: zurgenaboy on November 17, 2015, 08:50:19 PM
OK Margarett, as its not my forum, it would not be right for me to change any code
and mess it up, so I will uninstall the hover mod and then try the Global mod as it seems to be a really good mod.
Thank you for your time and help.

ps.   I took your earlier advice and now have regular backups.....lol
Title: Re: Global Topics
Post by: margarett on November 17, 2015, 08:51:49 PM
Ok good luck ;) Just let me know if you need further help ;)
Title: Re: Global Topics
Post by: zurgenaboy on November 17, 2015, 08:54:25 PM
Will do, but as its now 3am, I am off to bed.
Title: Re: Global Topics
Post by: 1985 on October 06, 2016, 05:55:21 PM
Hi,

Why the Global Topics dose not show for guests. The Global Topics only show for members of forum.

Edit: My mistake. I understand now.
Title: Re: Global Topics
Post by: Jailer on July 07, 2017, 10:43:51 AM
This mod seems to have stopped working on my forum. The global topic I set previously still functions but the button to set a new or existing topic global no longer appears.
Title: Re: Global Topics
Post by: efk on November 11, 2017, 03:42:05 PM
Any idea how to fix this?

Installations actions for "Global Topics"
Code: [Select]
* 1. Execute Modification ./index.php Test successful
1. Add After ./index.php Test successful
>>>>>* 2. Execute Modification ./Sources/Display.php Test failed
1. Replace ./Sources/Display.php Test failed<<<<<
2. Replace ./Sources/Display.php Test successful
3. Replace ./Sources/Display.php Test successful
4. Replace ./Sources/Display.php Test successful
5. Replace ./Sources/Display.php Test successful
* 3. Execute Modification ./Sources/Load.php Test successful
* 4. Execute Modification ./Sources/LockTopic.php Test successful
* 5. Execute Modification ./Sources/ManageBoards.php Test successful
* 6. Execute Modification ./Sources/ManagePermissions.php Test successful
* 7. Execute Modification ./Sources/MessageIndex.php Test successful
* 8. Execute Modification ./Sources/Recent.php Test successful
* 9. Execute Modification ./Sources/Subs.php Test successful
* 10. Execute Modification ./Sources/Subs-Boards.php Test successful
* 11. Execute Modification ./Themes/default/Display.template.php Test successful
* 12. Execute Modification ./Themes/default/ManageBoards.template.php Test successful
* 13. Execute Modification ./Themes/default/MessageIndex.template.php Test successful
* 14. Execute Modification ./Themes/default/Recent.template.php Test successful
* 15. Execute Modification ./Themes/default/Wireless.template.php Test successful
* 16. Execute Modification ./Themes/default/css/index.css Test successful
* 17. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful
18. Execute Modification ./Themes/default/languages/Modifications.english-utf8.php Skipping file
19. Extract File ./Themes/default/images/topic/global.gif
20. Adapt Database install.php

 Core Theme
Code: [Select]
Execute Modification ./Themes/core/Display.template.php Test successful
1. Replace ./Themes/core/Display.template.php Test successful
Execute Modification ./Themes/core/MessageIndex.template.php Test successful
1. Add After ./Themes/core/MessageIndex.template.php Test successful
Execute Modification ./Themes/core/Recent.template.php Test failed
1. Add After ./Themes/core/Recent.template.php Test failed
2. Add After ./Themes/core/Recent.template.php Test failed
Execute Modification ./Themes/core/css/index.css Test failed
1. Add Before ./Themes/core/css/index.css Test failed
Extract File ./Themes/core/images/topic/global.gif
I guess core theme is not important here.

Tepid (theme)
Code: [Select]
Tepid
Extract File ./Themes/tepid/images/topic/global.gif
Title: Re: Global Topics
Post by: kja12 on March 02, 2018, 12:30:57 PM
When installing the mod the execution fails at this:

Quote
Code: (Find) [Select]

foreach ($context['topics'] as $topic)
      {
         // Calculate the color class of the topic.
         $color_class = '';
         if (strpos($topic['class'], 'sticky') !== false)
            $color_class = 'stickybg';
         if (strpos($topic['class'], 'locked') !== false)
            $color_class .= 'lockedbg';

Code: (Add After) [Select]

         elseif ($topic['is_global'])
            $color_class = 'global';

Apparently our Recent_template.php is missing this chuck to display the global topic's background. It can be installed and it works but the background is transparent. Anyone has ideas how this could be fixed?
Title: Re: Global Topics
Post by: Rock Lee on March 02, 2018, 01:41:08 PM
What theme are you using? When it does not appear, the modification is not applied correctly.


Regards!
Title: Re: Global Topics
Post by: kja12 on March 03, 2018, 11:47:42 AM
What theme are you using? When it does not appear, the modification is not applied correctly.


Regards!

That message appears when checking the core theme. The one we are using is tepid and there the scripts used by this mod are missing at all.

(https://image.ibb.co/mAmyDS/gt.png)
Title: Re: Global Topics
Post by: Rock Lee on March 04, 2018, 08:18:46 AM
That message appears when checking the core theme. The one we are using is tepid and there the scripts used by this mod are missing at all.

(https://image.ibb.co/mAmyDS/gt.png)

So I see only the problems in the core of the topic, should not affect the modino uses it. Simply check the box of your theme and install without problems ... In any case if you use the core of the subject you must make the manual modification since the required lines were not found.

Regards!

ADD: Forgive my English is bad.
Title: Re: Global Topics
Post by: goldenstudios on June 02, 2020, 07:52:49 AM
work for 2.0.17?
Title: Re: Global Topics
Post by: @rjen on June 02, 2020, 08:15:33 AM
Almost any mod listed for 2.0 final will work in all 2.0 versions!

Just download it, upload in your package manager en press install.
If there are any issues the installer will list the errors and you can still abort the install then.
Title: Re: Global Topics
Post by: Horme Gaming on June 02, 2020, 08:16:19 AM
as I mentioned in your other topic, yes :)
Title: Re: Global Topics
Post by: shadav on July 26, 2020, 08:38:37 PM
one slight issue i've found
need to also add into the index.css if you want the background to be "highlighted" like sticky topics and lock topics
Code: [Select]
.topic_table td.global2
{
background-color: #C5E0FF;
}