Latest topics
» Auto-suggest @mentions as You Type
by skouliki Today at 04:57

» Hello everyone this is Adam from France
by SLGray Today at 01:09

» FM Themes
by SLGray Today at 01:08

» User - Made Creations
by SLGray Today at 01:07

» Search box only visible on hover
by SLGray Today at 00:58

» Browsers & Updates
by SLGray Today at 00:56

» Change newposts/no new posts/ locked icons
by T.C. Yesterday at 19:52

» [HELP] About Profile Cover Code
by MaHwOs Sun 19 Nov 2017, 18:54

» bloquer un membre
by berlingo Fri 17 Nov 2017, 18:19

» IconSkouliki Graphics
by skouliki Fri 17 Nov 2017, 03:54

» [IN PROGRESS] Can this code work on pun version
by skouliki Thu 16 Nov 2017, 03:50

» [TUTORIAL] [ALL VERSIONS] Warning before posting
by demon99 Wed 15 Nov 2017, 08:12

» About Add Reply & New Topic button (popup form)
by omarpop23 Mon 13 Nov 2017, 20:31

» Add a login popup for the toolbar
by Ape Sun 12 Nov 2017, 18:41

» Post a message automatically when locking a topic
by ThunderTB Sun 12 Nov 2017, 13:51

Recent Tutorials
Who is online?
In total there are 8 users online :: 0 Registered, 0 Hidden and 8 Guests :: 2 Bots

None

[ View the whole list ]


Most users ever online was 172 on Fri 19 Feb 2016, 05:17

Change the Path ::

View previous topic View next topic Go down

avatar
Ace 1
Valued Member
Title :

Beta Tester
Gender : Unspecified
Age : 18
Posts : 2151
Points : 2951
Reputation : 88
Location : USA
Language : English ?
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
Awards :
View all awards
View user profile http://fmdesign.forumotion.com/u190

PostAce 1 on Sun 25 Sep 2016, 14:55

With this tutorial you can change the path separator on your forum.





Installation


Administration Panel >> Modules >> HTML and Javascript >> Javascript codes management >> Create new javascript

Title: Path Changer
Placement: In all the pages

Code:
Code:
$(function() {
  var path = '::',

      paths = {
        'forum': $('p.nomargin.path'),
        'topic': $('div.pathname-box p'),
        'mcp': $('form div.topic-actions p'),
        'search': $('div.topic-actions p')
      },

      i;

  for (i in paths) {
    if (paths[i][0]) paths[i].html(paths[i].html().replace(/::/g, path));
  }
});

Old Code:
Code:
$(function() {
  var urls = [/\/f\d+/, /\/t\d+/, /\/modcp/, /\/search/],
 
  paths = {
    'forum' : $('p.nomargin.path'),
    'topic' : $('div.pathname-box p'),
    'mcp' : $('form div.topic-actions p'),
    'search' : $('div.topic-actions p')
  },
 
  path = '::',
 
  i, j, k;
 
  for ( i = 0; i < urls.length; i++ ) {
    for ( j in paths ) {
      j == 'forum' ? k = 0 : ( j == 'topic' ? k = 1 : ( j == 'mcp' ? k = 2 : k = 3 ) );
 
      if ( i == k && urls[i].test(window.location.href) ) paths[j].html(paths[j].html().replace(/::/g, path));
    }
  }
});


Modification


Basically this is what you need to change if you want to change the path separator.

Code:
  path = '::'

Hope you guys like it..



This only works on phpbb3 forums. If you want it on another version or any bugs come up with the code, then just post the issue with your forum link below.


Last edited by Ace 1 on Fri 29 Sep 2017, 14:42; edited 4 times in total
avatar
Ace 1
Valued Member
Title :

Beta Tester
Gender : Unspecified
Age : 18
Posts : 2151
Points : 2951
Reputation : 88
Location : USA
Language : English ?
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
Awards :
View all awards
View user profile http://fmdesign.forumotion.com/u190

PostAce 1 on Mon 31 Oct 2016, 11:21

Updated the code. Newer version is shorter.
avatar
Guest
Guest
View all awards

PostGuest on Sun 22 Jan 2017, 14:22

font size 0 px would have done the trick, silly!

View previous topic View next topic Back to top

Create an account or log in to leave a reply

You need to be a member in order to leave a reply.

Create an account

Join our community by creating a new account. It's easy!


Create a new account

Log in

Already have an account? No problem, log in here.


Log in

 
Permissions in this forum:
You cannot reply to topics in this forum