Advertisement:

Author Topic: Our Important Topics  (Read 20684 times)

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,688
  • Mod King
    • 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:)
News: Missing GitHub repository...

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,688
  • Mod King
    • 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!
News: Missing GitHub repository...

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline Portugal

  • Jr. Member
  • **
  • Posts: 186
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,688
  • Mod King
    • 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....
News: Missing GitHub repository...

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline Portugal

  • Jr. Member
  • **
  • Posts: 186
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,688
  • Mod King
    • 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!
News: Missing GitHub repository...

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline Portugal

  • Jr. Member
  • **
  • Posts: 186
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,688
  • Mod King
    • 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.
News: Missing GitHub repository...

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline ormuz

  • Full Member
  • ***
  • Posts: 688
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,688
  • Mod King
    • 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 »
News: Missing GitHub repository...

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline Rock Lee

  • SMF Hero
  • ******
  • Posts: 1,546
  • 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 © 2018
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

Offline ormuz

  • Full Member
  • ***
  • Posts: 688
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 ;)

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,688
  • Mod King
    • XPtsp.com Community
Re: Our Important Topics
« Reply #32 on: January 09, 2018, 12:23:01 PM »
Uploaded v1.6 - January 9th, 2018
o Added Spanish Latin translation, courtsey of Rock Lee!
o Added ssi_getRandomImportantTopic function to Subs-ImportantTopics.php.



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

@ormuz:  Sorry about taking so long with your feature request.  Hopefully, the newly added function will fulfill the feature request you asked about.

Since the Subs-ImportantTopics.php file is included when you call SSI.php or index.php, all you should have to do is call the function in order to get a random topic....
News: Missing GitHub repository...

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline ormuz

  • Full Member
  • ***
  • Posts: 688
Re: Our Important Topics
« Reply #33 on: January 09, 2018, 02:42:38 PM »
thank you so much, you rock!

Offline Snrj

  • Jr. Member
  • **
  • Posts: 303
  • Gender: Male
    • Snrj Forumları
Re: Our Important Topics
« Reply #34 on: March 30, 2018, 11:13:34 AM »
Turkish Lang
index.turkish-utf8.php and index.turkish.php
find
Code: [Select]
?>before add
Code: [Select]
$txt['itm_important_topics'] = 'Önemli Konular';
$txt['itm_no_important_topics'] = 'Henüz önemli bir konu yok.';
$txt['itm_unmark_as_important'] = 'Önemli olarak işaretini kaldır';
$txt['itm_unmark_confirm'] = 'Seçilen konuları önemli konular olarak işaretlemek istediğinizden emin misiniz?';
$txt['itm_mark_as_important'] = 'Önemli Olarak İşaretle';
$txt['itm_menu_top_level'] = 'Üst Menü';
$txt['itm_menu_under_level'] = 'Altında &quot;%s&quot;';
$txt['itm_menu_home'] = 'Nerede Gözüksün &quot;' . $txt['itm_important_topics'] . '&quot;';
$txt['permissionname_mark_important'] = 'Konuları önemli olarak işaretleyebilir';
$txt['permissionname_view_important'] = 'Önemli olarak işaretlenen konuları görüntüleyebilir';

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,688
  • Mod King
    • XPtsp.com Community
Re: Our Important Topics
« Reply #35 on: March 30, 2018, 12:39:31 PM »
Uploaded v1.7 - March 30th, 2018
o Added Turkish translation, courtsey of Snrj!



@Snrj:  Thank you for the translation!  It's been included in this version!
News: Missing GitHub repository...

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!