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 24 users online :: 0 Registered, 0 Hidden and 24 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
Database
Page 1 of 1 • Share
Did you change the YOUR_DATABASE in your Javascript installation?
This will look like:
This will look like:
- Code:
_database.tid = '/t79-database';
brandon_g wrote:May you post the exact link to your database.
And the ENTIRE installation Javascript.
Hmm something isn't right.
May you provide what I asked please. I will see what I can do for you myself.
http://seiya.forumotion.com/t1699-database
- Code:
var notice = 'Database object developed by Ange Tuteur - FM Design. Used to easily update and get topic database content.';
_database = new Object();
_database.tid = '/t1699-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 */
Edit: never mind, it appears I am the one with the outdated one.
Have you installed any plugin yet?
Last edited by brandon_g on Sun 29 Mar 2015, 13:23; edited 4 times in total
brandon_g wrote:I think I figured it out! You didn't install the latest database table. I just looked at the JV for my database on my test forum, looked at yours and realized your missing things. Make sure you install the latest and newest Database table, or it may not work right.
Edit never mind, it appears I am the one with the outdated one.
Have you installed any plugin yet?
no
One of your javascripts is causing an error, which is most likely why the database isn't working. To me, it looks like this snippet :
Check your javascripts for one that contains this, and disable it to see if it's the problem.
- Code:
$('.chatbox-username').each(function () {
this.previousSibling && $.trim(this.previousSibling.nodeValue) == '@' && $(this.previousSibling).replaceWith('<img src="http://i.imgur.com/zICIAne.png" /> ')
})
}
};
Check your javascripts for one that contains this, and disable it to see if it's the problem.
- 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