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 70 users online :: 0 Registered, 0 Hidden and 70 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
Display how many times a profile was viewed
Page 1 of 1 • Share
This plugin will allow you to display and log how many times someones profile was viewed. This is the first plugin for the database which will work on any version.
Creating a new table
If you haven't set up your database, please read over this topic : https://fmdesign.forumotion.com/t281-installation-a-database-for-your-forumotion-forum
Otherwise, go to your database, and click "New table" to create a new database table. In the textarea, paste the following code, and click submit.
Let it process your request, and the new table should be ready for us to use.
Installation
If you want the style for the view module like in the example, go to Administration Panel > Display > Colors > CSS stylesheet, and paste the following code.
Now, to install the plugin, go to Administration Panel > Modules > JavaScript codes management, and create a new script.
Title : fa_views
Placement : In all the pages
In the script, where you see YOUR_PID, you need to replace this by your database table's post ID. To find this ID click "edit database", then edit the post which holds your new table. Right in the address bar will be your PID, copy and paste this where YOUR_PID is.
When you're finished, save the script, and you should be ready to go ! To ensure that the installation was successful, make your way to a few profiles, and then return to your database. If the installation was successful, you'll see those profiles logged in the database table.
If any problems or questions, let me know. Enjoy !
Creating a new table
If you haven't set up your database, please read over this topic : https://fmdesign.forumotion.com/t281-installation-a-database-for-your-forumotion-forum
Otherwise, go to your database, and click "New table" to create a new database table. In the textarea, paste the following code, and click submit.
- Code:
[table id="fa_views" class="database_table"][tr][td]Username[/td][td]Views[/td][/tr][/table]
Let it process your request, and the new table should be ready for us to use.
Installation
If you want the style for the view module like in the example, go to Administration Panel > Display > Colors > CSS stylesheet, and paste the following code.
- Code:
.fa_views { color:#999; text-shadow:1px 1px 0 #FFF; text-decoration:none; text-align:center; font-size:11px; font-weight:bold; background:#EEE; border:1px solid #CCC; border-radius:3px; display:block; padding:5px 3px; margin:5px 0; }
Now, to install the plugin, go to Administration Panel > Modules > JavaScript codes management, and create a new script.
Title : fa_views
Placement : In all the pages
- Code:
window.location.pathname.match(/\/u\d+/) && $(function() {
var pid = 279, uid = window.location.pathname.match(/u(\d+)/)[1], mod = '#profile-advanced-right .module:first',n;
$('.bodylinewidth').length && (mod = 'td[width="300"] .forumline:first td.row1.gensmall');
$('.pun').length && (mod = '#profile-advanced-right .module:first .main-content');
$(mod).append('<div class="fa_views">Profile views : <span id="view_total">0</span></div>');
$.get(_database.tid, function(data) {
n = $('#fa_views #u'+uid+'_views',data);
n.length ? n = Number(n.text()) + 1 : n = 1;
document.getElementById('view_total').innerHTML = n;
_database.post({
pid : pid,
tableid : 'u'+uid+'_views',
update : ['\\[td id="u'+uid+'_views"\\]\\d+\\[/td\\]','[td id="u'+uid+'_views"]'+n+'[/td]'],
newRow : '[tr][td]'+document.title.match(/^.*? - (.*)$/)[1]+'[/td][td id="u'+uid+'_views"]'+n+'[/td][/tr]'
});
});
});
In the script, where you see YOUR_PID, you need to replace this by your database table's post ID. To find this ID click "edit database", then edit the post which holds your new table. Right in the address bar will be your PID, copy and paste this where YOUR_PID is.
When you're finished, save the script, and you should be ready to go ! To ensure that the installation was successful, make your way to a few profiles, and then return to your database. If the installation was successful, you'll see those profiles logged in the database table.
If any problems or questions, let me know. Enjoy !
- 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