Latest topics
» help me about Latest topic
by Haytam Today at 12:47

» Display a preview of the user profile on hover
by Haytam Today at 12:39

» Starred Forums
by Ange Tuteur Today at 12:27

» Chit Chat Thread
by Ange Tuteur Today at 12:11

» Colored Bar Navigation
by Valoish Yesterday at 23:03

» FM Themes
by SLGray Thu 25 May 2017, 22:39

» User - Made Creations
by SLGray Thu 25 May 2017, 22:37

» Classified Ads
by SLGray Thu 25 May 2017, 19:23

» Categories as tabs on Edge!
by STBW Thu 25 May 2017, 04:11

» [GAME] What are you thinking right now?
by Ange Tuteur Wed 24 May 2017, 15:10

» [GAME] Countdown from 200,000
by Ange Tuteur Wed 24 May 2017, 15:09

» [GAME] Post a random picture
by Ange Tuteur Wed 24 May 2017, 15:08

» [GAME] What are you doing right now?
by Ange Tuteur Wed 24 May 2017, 15:06

» [GAME] Count to 30 - Ange Edition
by Ange Tuteur Wed 24 May 2017, 15:05

» [GAME] Count to One Million!
by Ange Tuteur Wed 24 May 2017, 15:05

Recent Tutorials
Who is online?
In total there are 11 users online :: 3 Registered, 0 Hidden and 8 Guests :: 1 Bot

Haytam, JerriLeah7, Luffy

[ 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 :
God of Creation
Gender : Male
Age : 17
Posts : 2091
Points : 2699
Reputation : 78
Location : druid hill Park
Language : Eng, Fr, Loud
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 Mon 26 Dec 2016, 04:33; edited 3 times in total
avatar
Ace 1
Valued Member
Title :
God of Creation
Gender : Male
Age : 17
Posts : 2091
Points : 2699
Reputation : 78
Location : druid hill Park
Language : Eng, Fr, Loud
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