fantastic
Content Type
Profiles
Articles
Updates
Projects
Twitch
Website Bugs/Suggestions
Guides
Newsletters
About GFL
Knowledge Base
Expenses/Hardware
Server Comparisons
Routing
Form Bugs
Community Representative Applications
Development Request
Forums
Events
Posts posted by fantastic
-
-
On 8/4/2020 at 6:42 AM, Liloz01 said:
That just how it be; changing how IPS group search functions to search and display ALL groups, instead of just PRIMARY groups would require arcane knowledge (probably a shit load of fuckery too...). IMAGINE if Invision Community just provided settings for these things, life would be great.
I'll let this sit out until my brain is big enough or a developer comes along that wants to take up these sort of tasks (just like https://gflclan.com/forums/topic/22451-recruiter/ (not to say I've been forum manager for three years, like that thread has been up for three years)).
Thanks, nonetheless.
P.S.
A new staff directory is coming (btw, https://gflclan.com/staff/ is the staff directory). This should render the group search useless and I can probably make the group legend at the bottom route to the staff directory instead of using IPS group search. (As you correctly identified, IPS group search only displays users primary groups, the staff page displays primary and secondary).
Hey @Liloz01 ,
The IPB admins already confirmed they don't want native search to support searching secondary groups as those groups were largely not meant to be public 😞.
You can probably improve the search by having HTML anchors just above each group section in your staff directory (generating a unique ID for each anchor via PHP) and directly hyperlinking the staff directory link as part of the ranks in the legend. This way, when people click on the rank in the legend, they are brought to the page and scrolled down to where the team is on the page. Still not perfect, but it's something.
Here's an example (template of staff directory):
{{if \count( $members )}} {{if !$staffID}} {{$staffID = 1;}} {{endif}} <a name="{expression="'staffDirectoryTeam' . $staffID"}"></a> {{$staffID++;}} <section class='ipsBox cStaffDirectory'> <h2 class='ipsType_sectionTitle ipsType_reset'>{$group->_title}</h2> <div class='ipsPad_half'> {template="$group->template" app="core" group="staffdirectory" location="front" params="$members"} </div> </section> <br> {{endif}}You'll have to figure out which team corresponds to which ID, but I doubt you'll be changing up the staff directory often.
Example link: gflclan.com/staff#staffDirectoryTeam1
Wish I could've gotten the link to be something cleaner like /staff#directors, but converting the group title to something without spaces was surprisingly buggy. `str_replace` doesn't work with the template plugin for expressions. LMK if you get it to work on your end. I tried <a name="{expression="str_replace(' ', '', $group->_title)"}"></a>, but the output was still $group->_title.
Hope this helps 🙂

Saved Text Font/ Color or Size
in Abandoned
Posted · Edited by fantastic
Here's something that might help:
Option A: save to browser
1. Attach a listener onto the dropdowns in CKEditor to listen for a click on a font style or color (this should be done client-side)
2. When either a font style or color are chosen, save it to session or local storage
3. On page load, call the below script
Step 3 seems to work so I can't imagine step 1 and 2 isn't do-able. Probably need a check to only run this listener if either item actually exists, otherwise the listener is useless and the default fonts and colors won't be set properly.
Option B: save to account
1. Create new custom profile fields: one for font style and one for font color
2. Add regex validation to ensure sanitized input (and avoid xss attack). Don't know if this can be done as part of the profile field, but worst-case you can just run it as-needed in the below step
3. Add the above script in step 3 to the bottom of the CKEditor template, replacing the output of the browser-saved font family and font size from the data in the custom profile fields
Adapted from https://stackoverflow.com/a/60519978