Support Forum
believe when a user posts a url in a post, it gets made clickable... that is, the url text is converted to a hyperlink...
the user desires just the plain text url - not converted to hyperlink..
as I mentioned, if you are able to add a standard WordPress hook to a custom sp theme, this can be accomplished... its only 3 or 4 lines of code... but before posting it, just wanted to make sure you were willing to do that...
as to child theme, see: https://simple-press.com/simpl.....ld-themes/
as to custom theme, see: https://simple-press.com/docum.....g-a-theme/
Visit Cruise Talk Central and Mr Papa's World
If all you really want to do is prevent people from posting links in their forum posts then go to the permission set that your users utilise and turn off the permission 'Can create links in posts'.. Leave this option turned on for the permissions being used by your moderators and admins get full permissions at all times.
YELLOW
SWORDFISH
|
I'll prefer the code to display links in text. Eg. A user drops http://www.google.com it should remain as a text instead of getting hyperlinked automatically.
Or will setting such permission allow users to drop text link without getting them hyperlinked?
Try adding the following code to your spFunctions.php file in the /templates folder of the SP theme you are using. Note you must add this exactly as it appears here. Using the raw code button and then copying and pasting should work OK and you could use the theme editor admin panel provided by Simple:Press to make the edits with.
add_filter('sph_save_links_filter', 'remove_links_save', 1, 3); function remove_links_save($content, $original, $charcount) { global $spThisUser; if (!$spThisUser->moderator) { return $original; } return $content; } add_filter('sph_display_links_filter', 'remove_links_display', 1, 3); function remove_links_display($content, $original) { global $spThisUser; if (!$spThisUser->moderator) { return $original; } return $content; }
See if that does what you want.
As always we recommend that you create your own SP child theme or custom theme so that any customisation is not lost during a future update.
YELLOW
SWORDFISH
|
you were able to modify it? or need help?
Visit Cruise Talk Central and Mr Papa's World
Change it for this:
add_filter('sph_save_links_filter', 'remove_links_save', 1, 3); function remove_links_save($content, $original, $charcount) { return $original; } add_filter('sph_display_links_filter', 'remove_links_display', 1, 3); function remove_links_display($content, $original) { return $original; }
That will do it for all users.
YELLOW
SWORDFISH
|
1 Guest(s)