Advertisement:

Author Topic: Global Topics  (Read 52514 times)

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,759
  • Gender: Male
Re: Global Topics
« Reply #120 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?
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

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

Offline player.samp

  • Jr. Member
  • **
  • Posts: 128
  • Gender: Male
    • Aw Kelev Skoblar Brinks on Facebook
Re: Global Topics
« Reply #121 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.

Offline fastlight

  • Newbie
  • *
  • Posts: 1
Re: Global Topics
« Reply #122 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?

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,759
  • Gender: Male
Re: Global Topics
« Reply #123 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?
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

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

Offline zurgenaboy

  • Jr. Member
  • **
  • Posts: 101
  • Gender: Male
Re: Global Topics
« Reply #124 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.

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,759
  • Gender: Male
Re: Global Topics
« Reply #125 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?
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

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

Offline zurgenaboy

  • Jr. Member
  • **
  • Posts: 101
  • Gender: Male
Re: Global Topics
« Reply #126 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

Offline zurgenaboy

  • Jr. Member
  • **
  • Posts: 101
  • Gender: Male
Re: Global Topics
« Reply #127 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.)

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,759
  • Gender: Male
Re: Global Topics
« Reply #128 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...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

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

Offline zurgenaboy

  • Jr. Member
  • **
  • Posts: 101
  • Gender: Male
Re: Global Topics
« Reply #129 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?

Offline zurgenaboy

  • Jr. Member
  • **
  • Posts: 101
  • Gender: Male
Re: Global Topics
« Reply #130 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

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,759
  • Gender: Male
Re: Global Topics
« Reply #131 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 ;)

Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

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

Offline zurgenaboy

  • Jr. Member
  • **
  • Posts: 101
  • Gender: Male
Re: Global Topics
« Reply #132 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

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,759
  • Gender: Male
Re: Global Topics
« Reply #133 on: November 17, 2015, 08:51:49 PM »
Ok good luck ;) Just let me know if you need further help ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

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

Offline zurgenaboy

  • Jr. Member
  • **
  • Posts: 101
  • Gender: Male
Re: Global Topics
« Reply #134 on: November 17, 2015, 08:54:25 PM »
Will do, but as its now 3am, I am off to bed.

Offline 1985

  • Semi-Newbie
  • *
  • Posts: 12
Re: Global Topics
« Reply #135 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.
« Last Edit: October 06, 2016, 06:22:19 PM by 1985 »

Offline Jailer

  • Jr. Member
  • **
  • Posts: 142
  • Gender: Male
    • Bored Guy Blog
Re: Global Topics
« Reply #136 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.

Offline efk

  • Full Member
  • ***
  • Posts: 454
  • Gender: Male
Re: Global Topics
« Reply #137 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

Offline kja12

  • Newbie
  • *
  • Posts: 2
Re: Global Topics
« Reply #138 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?

Offline Rock Lee

  • Native Language Support Specialist
  • SMF Hero
  • *
  • Posts: 3,913
  • Gender: Male
  • Learning more every day!
    • BomberCode.Oficial on Facebook
    • RockLee-BC on GitHub
    • @Bomber_Code on Twitter
    • Bomber Code ~ La nueva era del conocimiento
Re: Global Topics
« Reply #139 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!
¡Regresando como cual Fenix! ~ Bomber Code © 2020
Ayudas - Aportes - Tutoriales - Y mucho mas!!!