Latest topics
» Forumactif Edge - Releases
by Ange Tuteur Tue 03 Sep 2019, 11:49
» GIFActif - Giphy Button for the Editor
by Ange Tuteur Wed 08 May 2019, 17:21
» Forum Closure
by Ange Tuteur Mon 01 Jan 2018, 01:28
» Chit Chat Thread
by Valoish Sun 31 Dec 2017, 19:15
» Font/Text background color.
by Valoish Sun 31 Dec 2017, 19:11
» Forumactif Messenger - Instant Message Application for Forumotion
by Wolfuryo Sun 31 Dec 2017, 18:24
» [GAME] Count to One Million!
by brandon_g Fri 29 Dec 2017, 18:58
» Post Cards
by manikbiradar Wed 20 Dec 2017, 07:50
» [GAME] Countdown from 200,000
by Valoish Wed 13 Dec 2017, 23:22
» GeekPolice Tech Support Forums - GeekPolice.net
by Dr Jay Mon 11 Dec 2017, 19:12
» Asking about some plugin for Forumotion
by Dr Jay Mon 11 Dec 2017, 19:10
» [GAME] What are you thinking right now?
by Van-Helsing Sat 09 Dec 2017, 14:51
» Widget : Similar topics
by ranbac Wed 06 Dec 2017, 18:11
» Change the Background of the Forum and put an image and how to make prefixs?
by Clement Wed 06 Dec 2017, 15:19
» Hello from Western Australia
by SarkZKalie Wed 06 Dec 2017, 05:34
by Ange Tuteur Tue 03 Sep 2019, 11:49
» GIFActif - Giphy Button for the Editor
by Ange Tuteur Wed 08 May 2019, 17:21
» Forum Closure
by Ange Tuteur Mon 01 Jan 2018, 01:28
» Chit Chat Thread
by Valoish Sun 31 Dec 2017, 19:15
» Font/Text background color.
by Valoish Sun 31 Dec 2017, 19:11
» Forumactif Messenger - Instant Message Application for Forumotion
by Wolfuryo Sun 31 Dec 2017, 18:24
» [GAME] Count to One Million!
by brandon_g Fri 29 Dec 2017, 18:58
» Post Cards
by manikbiradar Wed 20 Dec 2017, 07:50
» [GAME] Countdown from 200,000
by Valoish Wed 13 Dec 2017, 23:22
» GeekPolice Tech Support Forums - GeekPolice.net
by Dr Jay Mon 11 Dec 2017, 19:12
» Asking about some plugin for Forumotion
by Dr Jay Mon 11 Dec 2017, 19:10
» [GAME] What are you thinking right now?
by Van-Helsing Sat 09 Dec 2017, 14:51
» Widget : Similar topics
by ranbac Wed 06 Dec 2017, 18:11
» Change the Background of the Forum and put an image and how to make prefixs?
by Clement Wed 06 Dec 2017, 15:19
» Hello from Western Australia
by SarkZKalie Wed 06 Dec 2017, 05:34
Recent Tutorials
Top posting users this month
Top Achievers
Who is online?
In total there are 52 users online :: 0 Registered, 0 Hidden and 52 Guests :: 2 Bots
None
Most users ever online was 515 on Tue 14 Sep 2021, 15:24
None
Most users ever online was 515 on Tue 14 Sep 2021, 15:24
AJAX Profile Tabs
Page 1 of 1 • Share
* This topic is for testing, bugs may be present and if found should be reported to THIS topic *
Hello,
This project of mine is for allowing the tabs of the advanced profile load their contents without reloading the entire page. You can see an example by going to my profile and clicking the tabs.
https://fmdesign.forumotion.com/u1
Currently I have it working on phpbb3 and punbb. Please note that on phpbb2 and invision this does not currently work.
To apply and test this :
* the advanced profile must be active
* your forum version must be phpbb3 or punbb
Administration panel > Modules > Javascript codes management > Create a new script
Title : AJAX Profile Tabs
Placement : in all the pages
Paste the code below and save :
Once you have it enable you can go to your profile and test the tabs. If you encounter any bugs you may report it to this topic.
Many thanks and happy testing
Hello,
This project of mine is for allowing the tabs of the advanced profile load their contents without reloading the entire page. You can see an example by going to my profile and clicking the tabs.
https://fmdesign.forumotion.com/u1
Currently I have it working on phpbb3 and punbb. Please note that on phpbb2 and invision this does not currently work.
To apply and test this :
* the advanced profile must be active
* your forum version must be phpbb3 or punbb
Administration panel > Modules > Javascript codes management > Create a new script
Title : AJAX Profile Tabs
Placement : in all the pages
Paste the code below and save :
- Code:
$(function() {
var at = 'activetab';
var ti = '#tabs li';
var pa = ' #profile-advanced-details';
var ta = '#tabs a';
var taa = '#tabs .activetab a';
var atl = '#ajaxTabLoad';
var uw = '#userWall';
var up = '#userProfile';
var us = '#userStats';
var ua = '#userAttach';
var uf = '#userFriends';
var uc = '#userContact';
var ur = '#userRPG';
var L = location.pathname;
var uid = L.replace(/\/u/,'').replace(/wall/,'').replace(/stats/,'').replace(/friends/,'').replace(/contact/,'').replace(/rpg/,'').replace(/attachments/,'');
var wall = '/u'+uid+'wall';
var prof = '/u'+uid;
var stat = '/u'+uid+'stats';
var atta = '/u'+uid+'attachments';
var frnd = '/u'+uid+'friends';
var cnat = '/u'+uid+'contact';
var rpg = '/u'+uid+'rpg';
var load = '<div class="tabLoading panel row3 main-content clearfix" style="font-size:18px;text-align:center;padding:10px;">Loading...</div>';
var notAct = function() { $(ti).removeClass(at) };
if (document.getElementById('profile-advanced-layout')) {
if (L == wall) { $(taa).attr('href',wall) }
if (L == prof) { $(taa).attr('href',prof) }
if (L == stat) { $(taa).attr('href',stat) }
if (L == atta) { $(taa).attr('href',atta) }
if (L == frnd) { $(taa).attr('href',frnd) }
if (L == cnat) { $(taa).attr('href',cnat) }
if (L == rpg) { $(taa).attr('href',rpg) }
$(ta).click(function() { return false });
$(pa).wrap('<div id="ajaxTabLoad" style="margin-right:4px;"></div>');
$(ta+'[href="'+wall+'"]').attr('id','userWall');
$(ta+'[href="'+prof+'"]').attr('id','userProfile');
$(ta+'[href="'+stat+'"]').attr('id','userStats');
$(ta+'[href="'+atta+'"]').attr('id','userAttach');
$(ta+'[href="'+frnd+'"]').attr('id','userFriends');
$(ta+'[href="'+cnat+'"]').attr('id','userContact');
$(ta+'[href="'+rpg+'"]').attr('id','userRPG');
}
$(uw).click(function() {
if ($(this).closest('li').attr('class') == at) { return; }
notAct();
$(ti+':has('+uw+')').addClass(at);
$(atl).html(load).load(wall + pa);
});
$(up).click(function() {
if ($(this).closest('li').attr('class') == at) { return; }
notAct();
$(ti+':has('+up+')').addClass(at);
$(atl).html(load).load(prof + pa);
});
$(us).click(function() {
if ($(this).closest('li').attr('class') == at) { return; }
notAct();
$(ti+':has('+us+')').addClass(at);
$(atl).html(load).load(stat + pa);
});
$(ua).click(function() {
if ($(this).closest('li').attr('class') == at) { return; }
notAct();
$(ti+':has('+ua+')').addClass(at);
$(atl).html(load).load(atta + pa);
});
$(uf).click(function() {
if ($(this).closest('li').attr('class') == at) { return; }
notAct();
$(ti+':has('+uf+')').addClass(at);
$(atl).html(load).load(frnd + pa);
});
$(uc).click(function() {
if ($(this).closest('li').attr('class') == at) { return; }
notAct();
$(ti+':has('+uc+')').addClass(at);
$(atl).html(load).load(cnat + pa);
});
$(ur).click(function() {
if ($(this).closest('li').attr('class') == at) { return; }
notAct();
$(ti+':has('+ur+')').addClass(at);
$(atl).html(load).load(rpg + pa);
});
});
Once you have it enable you can go to your profile and test the tabs. If you encounter any bugs you may report it to this topic.
Many thanks and happy testing
Last edited by Ange Tuteur on Fri 04 Apr 2014, 13:18; edited 1 time in total
Hello,
I have made a few updates to the AJAX profile tabs. History pushstate has been removed and replaced with a better method to prevent the tabs from reloading the currently active. The amount of characters used has been reduced some as well. The updated script is above if you want to use it.
For previous version you can copy from this file : http://www.mediafire.com/view/fto2558xrzsflyy/AJAX%20Profile%20Tabs.txt
The new file can also be copied from here : http://www.mediafire.com/view/q88g1xce9znsxm8/AJAX_Profile_Tabs_v2.txt
I have made a few updates to the AJAX profile tabs. History pushstate has been removed and replaced with a better method to prevent the tabs from reloading the currently active. The amount of characters used has been reduced some as well. The updated script is above if you want to use it.
For previous version you can copy from this file : http://www.mediafire.com/view/fto2558xrzsflyy/AJAX%20Profile%20Tabs.txt
The new file can also be copied from here : http://www.mediafire.com/view/q88g1xce9znsxm8/AJAX_Profile_Tabs_v2.txt
- SelvesterMember
- Gender :
Age : 30
Posts : 19
Points : 4013
Reputation : 8
Language : English
Browser : Forum Version :
Actually spotted something with this and meant to mention it the other day but forgot. But when you scroll down in one of the tabs the little avatars scroll with it I guess. I don't know if it's suppose to do that but I thought it might be worth mentioning. I have screen shots on my computer but you could probably see for yourself before I get the chance to get on it and post them.
Oh yes, It was designed to float on the right like that. It could be changed if it poses a problem. It also acts as 'view profile' since I have included the user url on it.
- SelvesterMember
- Gender :
Age : 30
Posts : 19
Points : 4013
Reputation : 8
Language : English
Browser : Forum Version :
Alright. I think it's fine like that, just wasn't sure if it was supposed to. I don't see it posing any problems though.
Selvester wrote:Alright. :)I think it's fine like that, just wasn't sure if it was supposed to. I don't see it posing any problems though.
That is good then.
I think we mixed the topics, the question was for the popup, right ?
Rhino.Freak wrote:nice tutorial! again very helpful! thanx Ange!
You're welcome
- SelvesterMember
- Gender :
Age : 30
Posts : 19
Points : 4013
Reputation : 8
Language : English
Browser : Forum Version :
Ange Tuteur wrote:Selvester wrote:Alright. :)I think it's fine like that, just wasn't sure if it was supposed to. I don't see it posing any problems though.
That is good then.
I think we mixed the topics, the question was for the popup, right ?
... Oops... Yeah that should have been for the popup. XD My bad! This one is brilliant too though and hasn't shown any problems. Seems to work perfectly!
Heehee yes, I didn't notice either though
Very good
This one is working fine, only recently I noticed a mistake of mine. The new message bouton for the VM does not load, at least on here I think. I will need to fix that.
Very good
This one is working fine, only recently I noticed a mistake of mine. The new message bouton for the VM does not load, at least on here I think. I will need to fix that.
- lightningterrorMember
- Gender :
Posts : 20
Points : 3911
Reputation : 5
Language : English
Browser : Forum Version :
I just checked your forum and i found a lot of errors
You need to sort these errors out.
Uncaught SyntaxError: Unexpected identifier 99183.js:1
Uncaught SyntaxError: Unexpected token ILLEGAL 13336.js:1
Failed to load resource http://cdn.viglink.com/api/vglnk.js
Uncaught TypeError: Object [object global] has no method 'updateIframeSize' h1-:107
Failed to load resource http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?_=1402067089198
Uncaught TypeError: Cannot call method 'split' of undefined 0B1KYB697LuNxVUlqTDVLTXNHSkU:441
15
Uncaugh
You need to sort these errors out.
- Sponsored content
Similar topics
Create an account or log in to leave a reply
You need to be a member in order to leave a reply.
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum