FM Design
Would you like to react to this message? Create an account in a few clicks or log in to continue.

IMPORTANT

FM Design is in read-only mode, please click here for more information.

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

Recent Tutorials
Top posting users this month

Who is online?
In total there are 24 users online :: 0 Registered, 0 Hidden and 24 Guests :: 2 Bots

None

[ View the whole list ]


Most users ever online was 515 on Tue 14 Sep 2021, 15:24

Database

View previous topic View next topic Go down

Theshaka
Theshaka

Gender : Male
Age : 30
Posts : 31
Points : 3872
Reputation : 0
Language : Polish,English,French
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Other
http://seiya.forumotion.com/

PostTheshaka Sat 28 Mar 2015, 10:16

I created my database but i do something wrong i think, just look at this.
Database Bnnn
brandon_g
brandon_g

Gender : Unspecified
Age : 27
Posts : 458
Points : 4291
Reputation : 67
Location : USA
Language : English
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB2
http://broadcastingduo.forumotion.com

Postbrandon_g Sat 28 Mar 2015, 11:19

Did you change the YOUR_DATABASE in your Javascript installation?

This will look like:
Code:
 _database.tid = '/t79-database';
Find that in your Javascript. And replace it with the location of your database.
Theshaka
Theshaka

Gender : Male
Age : 30
Posts : 31
Points : 3872
Reputation : 0
Language : Polish,English,French
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Other
http://seiya.forumotion.com/

PostTheshaka Sat 28 Mar 2015, 11:35

I do that.
brandon_g
brandon_g

Gender : Unspecified
Age : 27
Posts : 458
Points : 4291
Reputation : 67
Location : USA
Language : English
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB2
http://broadcastingduo.forumotion.com

Postbrandon_g Sat 28 Mar 2015, 13:04

Did it work?
Theshaka
Theshaka

Gender : Male
Age : 30
Posts : 31
Points : 3872
Reputation : 0
Language : Polish,English,French
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Other
http://seiya.forumotion.com/

PostTheshaka Sat 28 Mar 2015, 19:30

Nope...
brandon_g
brandon_g

Gender : Unspecified
Age : 27
Posts : 458
Points : 4291
Reputation : 67
Location : USA
Language : English
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB2
http://broadcastingduo.forumotion.com

Postbrandon_g Sat 28 Mar 2015, 20:41

What is the url to your database topic?
May you also post your installation Javascript.
Theshaka
Theshaka

Gender : Male
Age : 30
Posts : 31
Points : 3872
Reputation : 0
Language : Polish,English,French
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Other
http://seiya.forumotion.com/

PostTheshaka Sun 29 Mar 2015, 05:59

_database.tid = '/t1699-database#13238';
brandon_g
brandon_g

Gender : Unspecified
Age : 27
Posts : 458
Points : 4291
Reputation : 67
Location : USA
Language : English
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB2
http://broadcastingduo.forumotion.com

Postbrandon_g Sun 29 Mar 2015, 08:06

May you post the exact link to your database.

And the ENTIRE installation Javascript.
Michael_vx
Michael_vx

Gender : Male
Age : 32
Posts : 302
Points : 4310
Reputation : 76
Language : Arabic
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Other
http://miccsoft.net https://www.facebook.com/Michaelvx2008

PostMichael_vx Sun 29 Mar 2015, 08:57

Theshaka wrote: _database.tid = '/t1699-database#13238';

remove the #13238 and it should work
Very Happy
Theshaka
Theshaka

Gender : Male
Age : 30
Posts : 31
Points : 3872
Reputation : 0
Language : Polish,English,French
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Other
http://seiya.forumotion.com/

PostTheshaka Sun 29 Mar 2015, 10:33

Michael_vx wrote:
Theshaka wrote: _database.tid = '/t1699-database#13238';

remove the #13238 and it should work
Very Happy

Nope, still same.
brandon_g
brandon_g

Gender : Unspecified
Age : 27
Posts : 458
Points : 4291
Reputation : 67
Location : USA
Language : English
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB2
http://broadcastingduo.forumotion.com

Postbrandon_g Sun 29 Mar 2015, 11:51

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. Very Happy
Theshaka
Theshaka

Gender : Male
Age : 30
Posts : 31
Points : 3872
Reputation : 0
Language : Polish,English,French
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Other
http://seiya.forumotion.com/

PostTheshaka Sun 29 Mar 2015, 12:00

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 */
brandon_g
brandon_g

Gender : Unspecified
Age : 27
Posts : 458
Points : 4291
Reputation : 67
Location : USA
Language : English
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB2
http://broadcastingduo.forumotion.com

Postbrandon_g Sun 29 Mar 2015, 12:11

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?


Last edited by brandon_g on Sun 29 Mar 2015, 13:23; edited 4 times in total
Theshaka
Theshaka

Gender : Male
Age : 30
Posts : 31
Points : 3872
Reputation : 0
Language : Polish,English,French
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Other
http://seiya.forumotion.com/

PostTheshaka Sun 29 Mar 2015, 12:25

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
brandon_g
brandon_g

Gender : Unspecified
Age : 27
Posts : 458
Points : 4291
Reputation : 67
Location : USA
Language : English
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB2
http://broadcastingduo.forumotion.com

Postbrandon_g Sun 29 Mar 2015, 13:21

I don't know then, your code seems to alright from I can tell. Maybe wait for Ange then. Neutral

I tried. Very Happy lol!

-Brandon
Theshaka
Theshaka

Gender : Male
Age : 30
Posts : 31
Points : 3872
Reputation : 0
Language : Polish,English,French
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Other
http://seiya.forumotion.com/

PostTheshaka Tue 31 Mar 2015, 14:36

Hope Ange will check forum sooooooooooooooooooooooon
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12258
Reputation : 2376
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur Tue 31 Mar 2015, 17:33

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 :
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.
Theshaka
Theshaka

Gender : Male
Age : 30
Posts : 31
Points : 3872
Reputation : 0
Language : Polish,English,French
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Other
http://seiya.forumotion.com/

PostTheshaka Wed 01 Apr 2015, 10:53

Work, thank you For you
Sponsored content

PostSponsored content

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