Phillyman Posted July 9, 2021 Posted July 9, 2021 Sometimes I feel like poor little Pages gets no love, the built in Wiki feature is worth its weight in gold. To be able to stand up databases and leverage our members to create/modify those pages....is a HUGE feature. Lets try to flesh out the recognition of our member when they add in information. Right now we can assign points and achievements for creating records, but generally, if I am standing up a huge database....I want to have control over the initial record creation. Why? Well lets take video games, its very easy to go grab a list of every Nintendo Entertainment System game ever released in the USA. However, if I let USERS create those records, generally there may be duplicates, because when it comes to "The Legend of Zelda", how are we handling that name? Under T for The? Under L for Legend? So I generally pick the naming scheme and then dump in the records in mass. But then its up to members to add in the information of said records. But we currently do not recognize revisions in any meaningful way. Lets look at Wikipedia... https://en.wikipedia.org/wiki/The_Legend_of_Zelda If you go to that page, you can drop down to the revisions.... https://en.wikipedia.org/w/index.php?title=The_Legend_of_Zelda&action=history and you can then see who the contributors are, and drill down further.... https://en.wikipedia.org/wiki/User:Sergecross73 We can then see the following under his wikipedia profile.... As you can see, very easy to see this user has made 76,400+ contributions to Wikipedia....along with many other automatically recognized "stats". People like to be recognized for their hardwork, even when its just a few mentions on their profile of their accomplishments on a site. AlexJ, Jimi Wikman, Unienc and 2 others 2 3
Phillyman Posted July 16, 2021 Author Posted July 16, 2021 (edited) I grew impatient, so I rigged some recognition of my own. Follow at your own risk, and only after you have made backups! Go into ibf_cms_database_revisions from inside of PhpMyAdmin and export these two fields to a CSV file.... `revision_id` `revision_member_id` You will end up with a CSV that looks something like this.....once saved open in Excel and save as a Tab Delimited file (Revisions.txt), store it in C:\Temp Basically Record 19, updated by member 1, Record 20 updates by member 1...etc Well this is no good, I dont want to count how many times Member 1 edited a record, that could be thousands of times..... Lets use AutoHotKey to do some logic on this..... #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. ; #Warn ; Enable warnings to assist with detecting common errors. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. COUNT = 0 PrevID = 9999999 Loop, read, C:\TEMP\Revisions.txt { StringSplit, LineArray, A_LoopReadLine, %A_Tab% RevisID := LineArray1 MembID := LineArray2 If MembID = %PrevID% { COUNT++ } else { COUNT++ FileAppend, UPDATE ``ibf_core_pfields_content`` SET ``field_44``='%COUNT%' WHERE ``member_id``='%PrevID%';`n, %A_ScriptDir%\Revisions-SQL.txt Count = 0 } PrevID := MembID } MSGBOX, Done! So I wrote a small script to read the tab delimited data and then write out SQL commands to drop the final numbers back into a custom profile field. In my case it ended up being field_44, which is a profile field that can't be edited by my members. In the end I get a bunch of SQL commands to use in PHPMyAdmin, which now I can see who had how many revisions across all my databases. UPDATE `ibf_core_pfields_content` SET `field_44`='5053' WHERE `member_id`='1'; Now we know that member 1 had 5053 database revisions. On the profile field side, I just created a text profile field, prevented members from editing it, and set the formatting like this..... <span class='fc'><img src="/images/database.png" alt="{$title}" title="{$title} - {$content}"></span> and now the database revisions show up on my profiles. Now if I could only learn how to do this automatically with PHP and Cron jobs 🤣 Again, check your tables, fields and backup before you try any of this. Edited July 16, 2021 by Phillyman sobrenome and Sonya* 2
Jordan Miller Posted July 16, 2021 Posted July 16, 2021 Just want to say mad respect for the time and attention you put into thinking this all out! We have a bunch of awesome stuff in the works, but I'd personally be interested in us expanding on Pages in the future! It's pretty darn good currently, but yes I'd love to see what else we can do with it as well. 🙏 Umaar, AlexJ and sobrenome 1 1 1
Sonya* Posted July 16, 2021 Posted July 16, 2021 1 hour ago, Jordan Invision said: I'd personally be interested in us expanding on Pages in the future sobrenome 1
sobrenome Posted July 23, 2021 Posted July 23, 2021 On 7/16/2021 at 5:41 PM, Jordan Invision said: Just want to say mad respect for the time and attention you put into thinking this all out! We have a bunch of awesome stuff in the works, but I'd personally be interested in us expanding on Pages in the future! It's pretty darn good currently, but yes I'd love to see what else we can do with it as well. 🙏 Please add moderation support for wiki style pages! It is impossible to use it right now because spammers can make a huge party on it!
MMXII Posted July 23, 2021 Posted July 23, 2021 On 7/16/2021 at 10:41 PM, Jordan Invision said: expanding on Pages in the future Yes, please! For IPS5, please add a ton of easy-to-use functionality so that we can build great looking pages with much coding-knowledge. Layouts, containers, boxes, everything with WYSIWYG, permission-based displaying... you can basically go through the whole Wordpress/Joomla/Drupal catalog. There is so much room for a true Pages app! Umaar, Phillyman, Davyc and 2 others 2 3
Recommended Posts