Like button
3 posters
Page 1 of 1
Like button
Hello! I would like my forum to show members ID's after they click the like button.
I saw on an other post that you replied that Forumotion dosent have a database to save the names and this feature is not avalablie yet. Can you please tell me is there is a way to do this?
Thanks.
I saw on an other post that you replied that Forumotion dosent have a database to save the names and this feature is not avalablie yet. Can you please tell me is there is a way to do this?
Thanks.
Re: Like button
Its not possible on FM as you don't have access to the database servers. So unfortunately its not possible to do.
Derri- Helper
- Posts : 8755
Reputation : 638
Language : English & Basic French
Location : Scotland, United Kingdom
Re: Like button
Hi @psaras,
It's possible if you have your own database on an external server. If not that, it's also possible by using a topic as a database, but it requires having your forum open to a certain degree. I explain it in a beta test for phpbb3 here : http://fmdesign.forumotion.com/t273-
It's possible if you have your own database on an external server. If not that, it's also possible by using a topic as a database, but it requires having your forum open to a certain degree. I explain it in a beta test for phpbb3 here : http://fmdesign.forumotion.com/t273-
Re: Like button
This is great, but quite difficult for me.Ange Tuteur wrote:Hi @psaras,
It's possible if you have your own database on an external server. If not that, it's also possible by using a topic as a database, but it requires having your forum open to a certain degree. I explain it in a beta test for phpbb3 here : http://fmdesign.forumotion.com/t273-
However, thanks very much.
Could you help me?
Re: Like button
Hello! I followed all your instructions to create a database and the like system step by step but in the end it dosent work properly... I can Like post but instead of showing the names of those who liked the post it keeps saying just "Loading...." and i dont know the reason.
Here is a photo of how the like system works on my forum
And here is the database that i created. It's not the same like your example on your installation guide.
I think somewere there i am wrong with my steps but i think that i followed the instructions properply.
It would be nice if you can help me.
Here is a photo of how the like system works on my forum
And here is the database that i created. It's not the same like your example on your installation guide.
I think somewere there i am wrong with my steps but i think that i followed the instructions properply.
It would be nice if you can help me.
Re: Like button
Hi @psaras,
I apologize for the late reply. It's not working because I made a mistake in v1.01 of the database script, which causes an error in IE8<. I made the correction in 1.02 which I'm working on, but I forgot to apply the correction to the install topic.
Replace your fa_database script with :
And it should correct the error.
I apologize for the late reply. It's not working because I made a mistake in v1.01 of the database script, which causes an error in IE8<. I made the correction in 1.02 which I'm working on, but I forgot to apply the correction to the install topic.
Replace your fa_database script with :
- Code:
_database = new Object();
_database.notice = 'Database plugin developed by Ange Tuteur - FM Design. Used to easily update and get topic database content.';
_database.tid = '/t7616-database';
_database.name = 'Database';
_database.data = function () {
var db = document.createElement('DIV');
db.style.display = 'none';
return document.body.appendChild(db);
};
/* database get method */
_database.get = function(tid, code) {
var db = _database.data();
$(db).load(tid, function() { code(db, function() { document.body.removeChild(db) }) });
};
/* database post method */
_database.post = function(o) {
if (_userdata.session_logged_in == 0) return;
var db = _database.data(), tables;
$(db).load('/post?p='+o.pid+'&mode=editpost #text_editor_textarea', function() {
tables = $(this).find('textarea');
if (RegExp('id="'+o.tableid+'"').test(tables.val())) tables.val(tables.val().replace(RegExp(o.update[0]), o.update[1]));
else tables.val(tables.val().replace(/\[\/table\]/,o.newRow + '[/table]'));
$.post('/post?p='+o.pid+'&mode=editpost', {
subject: _database.name,
message: tables.val(),
post: 1
}, function() { document.body.removeChild(db), o.reload && window.location.reload() });
});
};
/* create a new database table */
_database.newTable = function() {
var a = document.createElement('DIV'), b = document.createElement('INPUT'), c, t = document.createElement('TEXTAREA');
a.className = 'db_overlay';
b.className = 'db_button';
t.className = 'db_textarea';
b.value = 'Submit';
b.type = 'button';
c = b.cloneNode();
c.value = 'Cancel';
a.innerHTML = '<div class="dbo_content"><div class="db_title">Create a new database table</div><p class="db_info">Here you can create a new database table. For it to appear in the database, make sure to give the table the classname <strong>database_table</strong>, and a unique ID.</p><div style="text-align:center;"><p class="db_erreur"></p></div></div>';
a.firstChild.insertBefore(t,a.firstChild.lastChild);
a.firstChild.lastChild.appendChild(b);
a.firstChild.lastChild.appendChild(c);
document.body.appendChild(a);
b.onclick = function() {
if (!t.value.length) return this.previousSibling.innerHTML = 'You cannot create a new database table with an empty message body.';
a.innerHTML = a.innerHTML + '<div class="db_overlay"><div class="dbo_content process">Processing request, please wait...</div></div>';
$.post('/post', {
subject : _database.name,
t : _database.tid.match(/\/t(\d+)-/)[1],
message : t.value,
mode : 'reply',
post : 1
},function() { window.location.reload() });
};
c.onclick = function() { document.body.removeChild(a) };
};
/* START DATABASE CONTROL PANEL */
RegExp(_database.tid).test(window.location.pathname) && $(function() {
var admin = '', type = _userdata.user_level;
if (type == 1 && window.location.hash == '#edit') return $('.post').css('display','block');
if (type == 1) admin = '<a href="#new" onclick="_database.newTable();return false;">New Table</a><a href="#edit" onclick="window.location.hash=\'#edit\';window.location.reload();">Edit Database</a>';
document.title = 'Forum Database';
$('body').append('<div id="theOverwrite"><div id="db_wrap"><h1>Forum Database</h1><p class="db_info">This database is for storing simple data for plugins. You should avoid storing personal data, and should consider making backups of your database tables whenever possible.</p><div class="db_nav">'+admin+'<a href="/forum">Return to index</a></div><div id="db_list"><div class="db_title">Database List</div></div><div id="db_tables"><div id="currentDB" class="db_title">Select a database table from the left</div><div id="innertable"></div></div><p style="color:#999;font-size:10px;text-align:right;margin:6px 0;">Developed by <a href="http://fmdesign.forumotion.com/u1" target="_blank">Ange Tuteur</a> | Version 1.01</p></div></div>');
$('.database_table').appendTo('#innertable').hide().each(function() { $('#db_list').append('<div class="database">'+$(this).attr('id')+'</div>') });
$('#page-footer, #pun-foot, #gfooter, #gfooter + p').appendTo('#db_wrap');
$('body').addClass('databaseBody').html($('#theOverwrite').html());
$('#db_list .database').on('click', function() {
$('#db_tables .database_table').hide();
$('#db_list .database').removeClass('dbactif');
$(this).addClass('dbactif');
$('#' + $(this).text()).show();
$('#currentDB').text($(this).text());
});
$('#db_list .database:first').click();
});
/* END DATABASE CONTROL PANEL */
And it should correct the error.
Re: Like button
Thank you very much dear Ange.
Now everything is fine
Just one more question!
How do I move the button right below the post, because it is now under the avatar and there will be no place for several nickname?
Now everything is fine
Just one more question!
How do I move the button right below the post, because it is now under the avatar and there will be no place for several nickname?
Re: Like button
If you want the button to the right of the post, add this to your CSS :
If you mean to redirect users from the database, try the following :
Create a new javascript with placement in all the pages with the code that follows.
( Modules > JavaScript codes management > Create a new script )
Only admins will be able to access it.
You can also use CSS as an attempt to further hide the link of the topic :
( Display > Colors > CSS stylesheet )
However, this will also hide the link for you.
- Code:
.fa_like_row { text-align:right }
If you mean to redirect users from the database, try the following :
Create a new javascript with placement in all the pages with the code that follows.
( Modules > JavaScript codes management > Create a new script )
Only admins will be able to access it.
- Code:
$(function() {
var p = window.location.pathname;
if (p.match(/t\d+/) && _userdata.user_level != 1) p.match(/t(\d+)/)[1] == _database.tid.match(/t(\d+)/)[1] && (window.location.pathname = '/')
});
You can also use CSS as an attempt to further hide the link of the topic :
( Display > Colors > CSS stylesheet )
However, this will also hide the link for you.
- Code:
a[href^="/t7616"] { display:none }
Re: Like button
Is this topic now solved @psaras
Derri- Helper
- Posts : 8755
Reputation : 638
Language : English & Basic French
Location : Scotland, United Kingdom
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum