Advertisement:

Author Topic: Our Important Topics  (Read 19022 times)

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,423
    • XPtsp.com Community
Our Important Topics
« on: January 25, 2017, 10:34:01 PM »
Link to Mod


OUR IMPORTANT TOPICS v1.5
By Dougiefresh -> Link to Mod


Introduction
This mod allows designated membergroups the ability to mark topics as important (or not), and to be able to view the GLOBAL list of topics marked as important.

Membergroups having the Can Mark Topics As Important permission will be able to see a new menu under Moderate called Important Topics, which will have a listing of the topics that were marked as important.  They will also see a new button called Mark as Important for "unimportant" topics, or Unmark as Important for "important" topics, in the moderator buttons area

In order to ensure compatibility with previous versions, permission to view topics marked as important is automatically implied if permission to mark topics as important is granted.  To do otherwise doesn't make sense to me....

Admin Settings
Two new permissions are available in Admin => Members => Permissions for each membergroup:
o Can Mark Topics As Important
o Can View Topics Marked As Important

In Admin => Configuration => Modification Settings, there is a new setting:
o Where to place "Our Important Topics"

Compatibility Notes
This mod was tested on SMF 2.0.13, but should work on SMF 2.0 and up, as well as SMF 2.1 Beta 2.  SMF 1.x is not and will not be supported. 

Changelog
The changelog has been removed and can be seen at XPtsp.com.

License
Copyright (c) 2016 - 2017, Douglas Orend
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline sǝๅqɯɐɥS

  • SMF Hero
  • ******
  • Posts: 4,511
  • Gender: Male
    • i30 Owners Club
Re: Important Topics
« Reply #1 on: January 26, 2017, 01:50:08 AM »
It's like a bookmark feature :)

Does this mean that permitted membergroups get a new, previously unseen, "Moderate" button on their menu bar? Not so keen on that..

Offline akbora

  • Sr. Member
  • ****
  • Posts: 960
    • Anında Tepki
Re: Important Topics
« Reply #2 on: January 26, 2017, 09:52:46 AM »
Very good mod.

But I give errors like that. I coudn't understand


Notice: Undefined index: permissionname_mark_important in /home/xxx/public_html/Sources/ManagePermissions.php on line 1729
Notice: Undefined index: file in /home/xxxi/public_html/Sources/Errors.php on line 148 Notice: Undefined index: file in /home/xxx/public_html/Sources/Errors.php on line 150 Notice: Undefined index: file in /home/xxx/public_html/Sources/Errors.php on line 155 Notice: Undefined index: line in /home/xxx/public_html/Sources/Errors.php on line 155
SMF 2.0.13
Default Theme
Utf8 Turkish
---------------

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,423
    • XPtsp.com Community
Re: Important Topics
« Reply #3 on: January 26, 2017, 10:32:35 AM »
Does this mean that permitted membergroups get a new, previously unseen, "Moderate" button on their menu bar? Not so keen on that..
So where would you suggest the action link be placed?

Notice: Undefined index: permissionname_mark_important in /home/xxx/public_html/Sources/ManagePermissions.php on line 1729
This has been fixed for the next version.

Notice: Undefined index: file in /home/xxxi/public_html/Sources/Errors.php on line 148 Notice: Undefined index: file in /home/xxx/public_html/Sources/Errors.php on line 150
Notice: Undefined index: file in /home/xxx/public_html/Sources/Errors.php on line 155 Notice: Undefined index: line in /home/xxx/public_html/Sources/Errors.php on line 155
Okay, I can't fix this without your Sources/Error.php file, as it may or may not be "stock", and I'm not going to guess what is wrong with your install without knowing what your source file is.....
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline sǝๅqɯɐɥS

  • SMF Hero
  • ******
  • Posts: 4,511
  • Gender: Male
    • i30 Owners Club
Re: Important Topics
« Reply #4 on: January 26, 2017, 12:42:58 PM »
Does this mean that permitted membergroups get a new, previously unseen, "Moderate" button on their menu bar? Not so keen on that..
So where would you suggest the action link be placed?

I wasn't commenting on the placement. I meant, that using the button label "Moderate" could be confusing if the member has no actual moderation privileges.

As it gains access to the Important Topics manager, maybe it could be labeled "Important Topics"?

Offline br360

  • Lead Support Specialist
  • SMF Hero
  • *
  • Posts: 2,031
    • GenXcommunity
Re: Important Topics
« Reply #5 on: January 26, 2017, 02:21:57 PM »
In a member's profile drop down list would be a good place as well, as it would be their important topics to them.

Offline chrishicks

  • Full Member
  • ***
  • Posts: 508
  • Gender: Male
    • RejectsRestStop
Re: Important Topics
« Reply #6 on: January 26, 2017, 03:00:59 PM »
In a member's profile drop down list would be a good place as well, as it would be their important topics to them.

I second this.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,423
    • XPtsp.com Community
Re: Important Topics
« Reply #7 on: January 26, 2017, 03:27:53 PM »
It's like a bookmark feature :)
Almost like a bookmark feature, except it's global for all users with the permission to see/manipulate the list of important topics.....
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline Linkjay

  • Jr. Member
  • **
  • Posts: 206
  • Gender: Male
  • eh
    • My Homepage.
Re: Important Topics
« Reply #8 on: January 26, 2017, 10:47:26 PM »
Damn I gotta try this.

How is this different than stickying though?
I play games in my free time and volunteer my knowledge and support to the gaming communities of the internet.

You can contact me by these methods:
Use my Contact Script • PM me here • Add me on Steam

Offline br360

  • Lead Support Specialist
  • SMF Hero
  • *
  • Posts: 2,031
    • GenXcommunity
Re: Important Topics
« Reply #9 on: January 26, 2017, 11:08:08 PM »
It is similar to a bookmark mod. You see topics that you like or want to keep track of, and you mark them as important. All the topics you mark as important are then listed in a link where you can keep track of them all in one place.

Offline Linkjay

  • Jr. Member
  • **
  • Posts: 206
  • Gender: Male
  • eh
    • My Homepage.
Re: Important Topics
« Reply #10 on: January 26, 2017, 11:16:24 PM »
It is similar to a bookmark mod. You see topics that you like or want to keep track of, and you mark them as important. All the topics you mark as important are then listed in a link where you can keep track of them all in one place.

That sounds pretty good. Ima try this when I get the chance.
I play games in my free time and volunteer my knowledge and support to the gaming communities of the internet.

You can contact me by these methods:
Use my Contact Script • PM me here • Add me on Steam

Offline IncredibleInstinct

  • Newbie
  • *
  • Posts: 2
Re: Important Topics
« Reply #11 on: January 26, 2017, 11:47:25 PM »
Looks like BookMark Mod , There is some other ways to track your Topics/Sites/Websites , etc . I Use Google Chrome so My all Important Sites are in My TAB , HomePage , BookMark :P , Alright Thanks Dougiefresh :D

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,423
    • XPtsp.com Community
Re: Important Topics
« Reply #12 on: January 27, 2017, 09:14:06 AM »
How is this different than stickying though?
Members of certain membergroups (I would suggest moderators) could tag topics as important, and ANY TOPICS TAGGED were viewable in a list available only to those membergroups.  The list is GLOBAL, which means any member could add or remove topics from that list.  Keep in mind there is only ONE LIST and any changes to that list are made for EVERYBODY that can see the list.

It is similar to a bookmark mod. You see topics that you like or want to keep track of, and you mark them as important. All the topics you mark as important are then listed in a link where you can keep track of them all in one place.
Not quite.  A corrected version should read:
Quote
All the topics EVERYBODY marked as important are then listed in a link where you can keep track of them all in one place.

Looks like BookMark Mod , There is some other ways to track your Topics/Sites/Websites , etc . I Use Google Chrome so My all Important Sites are in My TAB , HomePage , BookMark :P , Alright Thanks Dougiefresh :D
True, it is similar to a bookmark mod, but it is forum-wide and only viewable to those that have permission to use it.  If you don't have permission, there is no indication that the mod is even available for you to view/use.
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,423
    • XPtsp.com Community
Re: Our Important Topics
« Reply #13 on: January 30, 2017, 10:58:12 AM »
Uploaded v1.1 - January 30th, 2017
o Added support for SMF 2.1 Beta 2.
o Fixed missing permission name error.
o Moved "Important Topics" item from "Moderate" to the "Home" menu.
o Removed "Important Topics" from moderation menu.
o Renamed "Important Topics" to "Our Important Topics".



@Everybody:  Hopefully, this update clarifies the misunderstandings that have been brought up.....
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline sǝๅqɯɐɥS

  • SMF Hero
  • ******
  • Posts: 4,511
  • Gender: Male
    • i30 Owners Club
Re: Our Important Topics
« Reply #14 on: January 30, 2017, 02:26:08 PM »
Get's a yes from me ;)

Offline Portugal

  • Jr. Member
  • **
  • Posts: 174
Re: Our Important Topics
« Reply #15 on: February 06, 2017, 04:55:27 AM »
Its all i need, in fact i ask a few days ago for something like this, very thanks.
One question, its possibile to move the "Important topics" from "Home" menu to "Personal mesages" or to creat a new item on this menu caled "Important topics"?



Thanks in advance

Offline Portugal

  • Jr. Member
  • **
  • Posts: 174
Re: Our Important Topics
« Reply #16 on: March 24, 2017, 10:57:28 AM »
Hi,

Sorry to insist, but if possibile i want to change that mod like i said before, it is possibile dougiefresh? I need to instal something like tah, but need that change made before. Another question, to translate this to other languages? What files i need to work?

Thanks in advance
Portugal

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,423
    • XPtsp.com Community
Re: Our Important Topics
« Reply #17 on: March 27, 2017, 05:46:40 PM »
Sorry to insist, but if possibile i want to change that mod like i said before, it is possibile dougiefresh? I need to instal something like tah, but need that change made before. Another question, to translate this to other languages? What files i need to work?
I'm not going to make several different versions of the same mod, each putting it in different places.  Everyone can't seem to agree where this mod should place it, so I'm trying to figure out how to make it a user-configurable setting.  That way, everyone can decide for themselves where they want it.....

The problem I'm running into at the moment is the place where I stick the information disappears after the top menu is built....  Yes, I've tried using the $context variable, the $settings variable, the $modSettings variable, and yes, I have even tried using a totally new global variable to store this crap in.  I simply can't retrieve the new array I've built....  and it's driving me a little crazy....  >:(
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline Linkjay

  • Jr. Member
  • **
  • Posts: 206
  • Gender: Male
  • eh
    • My Homepage.
Re: Our Important Topics
« Reply #18 on: March 27, 2017, 06:03:10 PM »
Sorry to insist, but if possibile i want to change that mod like i said before, it is possibile dougiefresh? I need to instal something like tah, but need that change made before. Another question, to translate this to other languages? What files i need to work?
I'm not going to make several different versions of the same mod, each putting it in different places.  Everyone can't seem to agree where this mod should place it, so I'm trying to figure out how to make it a user-configurable setting.  That way, everyone can decide for themselves where they want it.....

The problem I'm running into at the moment is the place where I stick the information disappears after the top menu is built....  Yes, I've tried using the $context variable, the $settings variable, the $modSettings variable, and yes, I have even tried using a totally new global variable to store this crap in.  I simply can't retrieve the new array I've built....  and it's driving me a little crazy....  >:(

I don't think there has been a more appropriate time for your profile picture to apply here...
I play games in my free time and volunteer my knowledge and support to the gaming communities of the internet.

You can contact me by these methods:
Use my Contact Script • PM me here • Add me on Steam

Offline Portugal

  • Jr. Member
  • **
  • Posts: 174
Re: Our Important Topics
« Reply #19 on: March 28, 2017, 06:31:38 AM »
I'm not going to make several different versions of the same mod, each putting it in different places.  Everyone can't seem to agree where this mod should place it, so I'm trying to figure out how to make it a user-configurable setting.  That way, everyone can decide for themselves where they want it.....

The problem I'm running into at the moment is the place where I stick the information disappears after the top menu is built....  Yes, I've tried using the $context variable, the $settings variable, the $modSettings variable, and yes, I have even tried using a totally new global variable to store this crap in.  I simply can't retrieve the new array I've built....  and it's driving me a little crazy....  >:(

Dont be crazy for that, keep calm :) i just sugest some modifications, in fact that mod its really useful (at least for my forum), i will go to wait for future developments, i just want to say a big thanks to share your work....for free, i think all of us (SMF users) apreciate alot your work and course of all who keep this idea, that wonderful tool (SMF) alive and on top :) Since 2006 im part of that "familly".

Thanks

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,423
    • XPtsp.com Community
Re: Our Important Topics
« Reply #20 on: March 28, 2017, 09:41:20 AM »
Uploaded v1.2 - March 28th, 2017
o Added admin option to control where the "Our Important Topics" menu entry is located.
o Added permission to view the important topic list.
o Added code to view important topic list if permission to mark topics is present.



@Portugal:  Hopefully, this update addresses your request adequately....

Last night before I went to bed, I figured out why I couldn't read the top menu labels.....  They hadn't been inserted into the array yet!!!!  AARGH!!!  Turns out the function to add stuff to the top menu gets executed WAAAAY after the modification settings stuff does....  Anyways, it's been worked around, so this feature now works....  Gives me a few ideas on how to rearrange the top menu in a mod....  O:)
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,423
    • XPtsp.com Community
Re: Our Important Topics
« Reply #21 on: March 28, 2017, 10:16:43 AM »
Another question, to translate this to other languages? What files i need to work?
All language strings are held within the language_english.xml file inside the mod.  Copy the file and change the filename you are adding the strings to.  For example, change this:
Code: (Find) [Select]
<file name="$languagedir/index.english.php">to this:
Code: (Replace) [Select]
<file name="$languagedir/index.french-utf8.php" error="skip">Yes, the error="skip" is important, as  with that tidbit present, the mod won't attempt to install those changes in non-existant files!  Translate anything to the right of the equal sign on lines that begin with $txt.  Once complete, attach the translation to this thread for inclusion into the next version.  Thanks!
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline Portugal

  • Jr. Member
  • **
  • Posts: 174
Re: Our Important Topics
« Reply #22 on: March 29, 2017, 05:35:12 AM »
@dougiefresh you are "the master", very thanks, i will go to test it today, soon i will give you some feedbak... very thanks for your dedication.


Thanks

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,423
    • XPtsp.com Community
Re: Our Important Topics
« Reply #23 on: April 06, 2017, 10:01:46 AM »
Uploaded v1.3 - April 6th, 2017
o Added temporary theme load hook to capture all top menu items.
o Moved buffer hook to Modification Settings code as temporary hook.



@Everybody:  By moving the buffer hook into the modification settings code, the forum should help the performance of the forum.  It's one of those after-thought things that I thought I'd address, since I haven't had much time to much of anything else....
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline Portugal

  • Jr. Member
  • **
  • Posts: 174
Re: Our Important Topics
« Reply #24 on: April 07, 2017, 04:15:57 PM »
@dougiefresh ive attached the translation for Portuguese language. If have some bug please let me know to remake :)

Now im waiting for news :)


Thanks again!


Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,423
    • XPtsp.com Community
Re: Our Important Topics
« Reply #25 on: April 07, 2017, 05:22:43 PM »
Uploaded v1.4 - April 7th, 2017
o Included Portuguese translation provided by Portugal.  Thanks, Portugal!



@Portugal:  Thank you for the translation!  It's been included in this version!
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline Portugal

  • Jr. Member
  • **
  • Posts: 174
Re: Our Important Topics
« Reply #26 on: April 08, 2017, 03:52:53 PM »
Thanks @dougiefresh i just say "Great" work made fr you.

Now just need a litle improvment the translation as i did dont works.... (i know its a a bad notice), but i already works a bit on it and i discovered whats the problem... and the problem is the word "tópico" (the "ó") i quit the ó and just use the o (without ´and it works), so just replace the "tópico" by "topico" and it works... and just other modification is the "portuguese_pt" instead of "portuguese". Sorry for the inconvenience... work team has this kind of situations :).

Thanks for your great work... really a valuable effort made for you!

Regards
Portugal


Uploaded v1.4 - April 7th, 2017
o Included Portuguese translation provided by Portugal.  Thanks, Portugal!



@Portugal:  Thank you for the translation!  It's been included in this version!

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,423
    • XPtsp.com Community
Re: Our Important Topics
« Reply #27 on: July 11, 2017, 11:44:46 AM »
Uploaded v1.5 - July 11th, 2017
o Replaced IFNULL with COALESCE in database queries for better Postgres support.
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline ormuz

  • Full Member
  • ***
  • Posts: 677
Re: Our Important Topics
« Reply #28 on: December 02, 2017, 10:29:14 AM »
Question...

How can I display this in a specific place on my theme, or in a simpleportal block?

I want to use this to display one random (important) topic in a "ssi boardnews" style. Any suggestion on where to start?

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,423
    • XPtsp.com Community
Re: Our Important Topics
« Reply #29 on: December 02, 2017, 10:58:34 AM »
How can I display this in a specific place on my theme, or in a simpleportal block?
You need to create a forum link with ?action=important in it wherever you plan on placing the link.  So, if your forum is at hxxp://www.duh.com/forum, then the link would read hxxp://www.duh.com/forum/index.php?action=important

I want to use this to display one random (important) topic in a "ssi boardnews" style. Any suggestion on where to start?
This mod isn't designed to function like that.  But if you're insistant on using/abusing the mod to do so, then you need to call ITM_Topics_Count to get the number of topics; then ITM_Get_Topics to get the topic information, which returns an array of important topics.  From there, you can generate a random number between 0 and the number ITM_Topics_Count returned, and process that element of the array.

EDIT:  I guess I can write an SSI function to get able to get a random "important" topic....
« Last Edit: December 02, 2017, 11:48:26 AM by dougiefresh »
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline Rock Lee

  • Sophist Member
  • *****
  • Posts: 1,210
  • Gender: Male
  • Digitalizando un nuevo mundo :D
    • BomberCode.Oficial on Facebook
    • RockLee-BC on GitHub
    • @Bomber_Code on Twitter
    • Bomber Code ~ La nueva era del conocimiento
Re: Our Important Topics
« Reply #30 on: December 03, 2017, 07:16:37 PM »
It seems very good that the modification and the fact that I was looking for something similar for my forum that I plan to reopen this week if possible 8) also you like the Spanish version, just tell me if something is missing ...


Regards!
¡Regresando como cual Fenix! ~ Bomber Code © 2017
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

Offline ormuz

  • Full Member
  • ***
  • Posts: 677
Re: Our Important Topics
« Reply #31 on: December 04, 2017, 07:01:17 AM »
EDIT:  I guess I can write an SSI function to get able to get a random "important" topic....

that would be great. Specially with a boardnews layout style ;)