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
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/)
woo, marvelous good mod :) congrats. i need to my forum
Nice idea for a mod. thanks
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 ??
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.
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.
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.
Quote from: Tenma 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.
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?
Quote
Nice idea for a mod. thanks
But it noly for 2.0RC,can you update for SMF1.1.8? :)
Quote from: gourav on April 02, 2009, 02:38:58 AM
can you please please post a screen shot that where to makit
enable?
Attached a screen shot.
Quote from: bosser 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? :)
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.
Good, this MOD is very usefull :D
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...
Wow, thanks. I was looking for a mod that did this :D.
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?
Try doing a hard refresh on the page. (Ctrl + F5)
Nothing,still the same.
Attach your style.css file here.
Attached ^^.Thanks.
EDIT: ok,solved.I changed "color_class" to "colour_class" and now works for me.
@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..
Would you provide me a link to the topic and the board as an example?
@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 ???
I need somebody help me for my forum version 1.1.9.
why not support for older version same 1.1.9 ?
Nice addition - did you maybe consider of making "category topic"? Meaning that some topic appears in every board under specified categories?
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.
i need this for rc2 too
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.
+100
Any word on if this will be updated for RC2?
This is an Excellent mode , please update it to RC3
Quote from: 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.
;-(
Quote from: MoreBloodWine on August 30, 2010, 07:06:43 AM
Quote from: 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.
;-(
I would like this for 1.1.12 too if possible? Any help?
Great Mod. Another one that should be incorporated in the next version of SMF.
Brazil Portuguese translation:
<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 "{topic}"';
$txt['modlog_ac_unglobal'] = 'Não fez global "{topic}"';
$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ó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 "{topic}"';
$txt['modlog_ac_unglobal'] = 'Não fez global "{topic}"';
$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>
Hello, is there also a SMF 1.1 Version of this mod?
SMF 1.1 should be available only in museums. ;)
I'm looking for the version of this mod for SMF version 2.1 ;D
Quote from: littlenicki on May 01, 2014, 10:21:53 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...
Today I put this MOD to work and this appearing the following errors in the logs
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
Can you attach Subs.php?
Thanks for the attention.
In this annex the requested file.
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)
Tested. Worked perfectly
Thank you very much. (http://eletronicabr.com/Smileys/blue/kiss.gif)
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.
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.
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.
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.
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.
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?
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 :(
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)
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 ;)
Thank you for this mod...Great work! (http://www.cruetube.com/Forum/Smileys/akyhne/th_thumbup.gif)
Installed the updated version. Working great.
Thanks!
I deleted the old plugin, but did not delete the database
I installed the new version but did not improve.
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
ok thanks :)
it fix
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.
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.
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...
No problem. I know all to much how the craziness can get at the job.
Both problems now fixed ;)
Awesome!
(http://www.bayoustatefishing.com/community/Smileys/default/ThankYou.gif)
thx great work.
So, I got the error with the undefined "is_global" thingy.
Also, the images are broken.
Uh? :o now that's strange. I have to check, maybe I messed with older files? (Not likely, though...)
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?
The one for the stickies. And I get the undefined is_global error in the "Last replies" thingies.
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?
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...
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"...
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 ;)
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...
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:
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...
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...
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
Thanks ;)
Actually it looks good to me... I see the global topic with the light blue background...
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
Don't you just love computers? :P
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 .-.
Please open a topic in Graphics and Templates for that ;) It should be doable, of course ;)
Hi ,
This message show on my site.
"Unknown column 'b.global_topics' in 'field list'"
Quote from: Mr.Bet on June 15, 2014, 10:20:31 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.
Quote from: Flavio93Zena on June 15, 2014, 11:58:32 AM
Quote from: Mr.Bet on June 15, 2014, 10:20:31 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.
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.
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 ;)
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.
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 :)
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
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)
Quote from: ‽ 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)
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.
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.
Check that you're using the latest version. This was in fact an issue in previous version but it was fixed meanwhile.
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.
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
Quote from: 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 ;)
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
Yup, one of the latest issues was exactly the same :(
http://www.simplemachines.org/community/index.php?topic=301482.msg3698052#msg3698052
Quote from: 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
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.
So basically he wants to see the changes log...
Quote from: Flavio93Zena on June 16, 2014, 08:44:54 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 :(
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.
Quote from: ‽ 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.
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.
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.
Wew so fast replies I am working and didn't see them.
Quote from: RSI on June 16, 2014, 09:12:15 PM
Quote from: Flavio93Zena on June 16, 2014, 08:44:54 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 :(
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 ;)
Quote from: ‽ 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.
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.
Quote from: ‽ on June 16, 2014, 09:13:37 PM
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 ;)
Quote from: ‽ 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.
Major overwriting of what? I didn't get that. You were meaning the radio buttons list of the mod itself or..?
Quote from: ‽ on June 16, 2014, 09:13:37 PM
I still do not understand why you don't have the mods you installed in the packages folder on your site.
Again me too.
QuoteMajor 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.
:O to fix what? It seems pretty much anti-noob and user friendly to me...
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.
Quote from: zeroinfection 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.
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)
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
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 ;)
lol
sorry i didnt see that lol
cheers mate
Howdy, sorry I misunderstood that >_<
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.
Yes, there is just one icon for global topics... It would require multiple icons to be available, and I suck at graphics :P
Quote from: 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
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?
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.
Quote from: 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
Not a problem. Just didn't know if it was maybe something that was over looked.
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.
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.
Quote from: 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.
I didn't notice that I have to select a theme when installing it? Do I have to uninstall it?
I sorted it out now I want to know how can I make this global topic on top?
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.
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:
An Error Has Occurred!
The database value you're trying to insert does not exist: is_global
Can't really reproduce it....
Didn't you get any error at install that you ignored, maybe?
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.
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?
Hi and welcome to sm.org ;)
Can you post a print screen of the behavior you described?
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.
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?
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
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.)
You have another MOD conflicting with this which produces that error.
Original MessageIndex.template.php has:
// 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:
// 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:
// 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...
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?
Or shall I just uninstall the board hover mod?
I really appreciate your help and advice Margarett
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 ;)
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
Ok good luck ;) Just let me know if you need further help ;)
Will do, but as its now 3am, I am off to bed.
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.
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.
Any idea how to fix this?
Installations actions for "Global Topics"
* 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
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)
Tepid
Extract File ./Themes/tepid/images/topic/global.gif
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?
What theme are you using? When it does not appear, the modification is not applied correctly.
Regards!
Quote from: 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!
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)
Quote from: kja12 on March 03, 2018, 11:47:42 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.
work for 2.0.17?
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.
as I mentioned in your other topic, yes :)
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
.topic_table td.global2
{
background-color: #C5E0FF;
}