[Znote AAC] Flags for characterview and highscores

Raggaer

Godly Member
Joined
Jul 25, 2012
Messages
1,545
Best answers
8
Likes
860
Location
Spain
#1
Hello this will add flags to your website like in gesior!
Tested in TFS_02
- Images -

Untitled-2.jpg

Untitled-4.jpg

Untitled-6.jpg

- Install -

Download attachment
Drag highscores.php , characterprofile.php, register.php to your Znote folder
Then go to engine\function\ and drag users.php there
Add flag folder to your Znote folder
Execute this query

Code:
ALTER TABLE `accounts`
ADD `flag` VARCHAR( 20 ) NOT NULL;
Code:
ALTER TABLE `znote_accounts`
ADD `flag` VARCHAR( 20 ) NOT NULL;
And we are done! ( old accounts wont have flag )

View attachment flaggy.rar
 

Znote

<?php echo $title; ?>
Staff member
Global Moderator
Premium User
Joined
Feb 14, 2008
Messages
6,367
Best answers
150
Likes
1,060
Location
Norway, Oslo
#2
I don't recommend altering the original TFS tables, thats why I made the znote_ structure.

You can fetch info from znote account table by simply calling this function:
PHP:
<?php
// Fetch flag from znote account table
$account_data = user_znote_account_data($account_id, 'flag');

// Test echo where I echo flag id:
echo $account_data['flag'];
?>
 
Joined
May 9, 2009
Messages
86
Best answers
0
Likes
0
#5
Hello otlanders!
I have a question about Znote.

How I put the Flag-Country in Onlinelist.php?
Thanks a lot.
 
Joined
Dec 27, 2010
Messages
30
Best answers
0
Likes
1
#6
I don't recommend altering the original TFS tables, thats why I made the znote_ structure.

You can fetch info from znote account table by simply calling this function:
PHP:
<?php
// Fetch flag from znote account table
$account_data = user_znote_account_data($account_id, 'flag');

// Test echo where I echo flag id:
echo $account_data['flag'];
?>
Where would i put that? :p sorry im new
 
Joined
Sep 11, 2012
Messages
98
Best answers
0
Likes
15
#8
When i open My account it appears some errors:

Notice: Undefined index: name in C:\xampp\htdocs\znoteaac\myaccount.php on line 144

Notice: Undefined index: name in C:\xampp\htdocs\znoteaac\myaccount.php on line 144

Notice: Undefined index: level in C:\xampp\htdocs\znoteaac\myaccount.php on line 144

Notice: Undefined index: vocation in C:\xampp\htdocs\znoteaac\myaccount.php on line 144

Notice: Undefined index: town_id in C:\xampp\htdocs\znoteaac\myaccount.php on line 144

Notice: Undefined index: lastlogin in C:\xampp\htdocs\znoteaac\myaccount.php on line 144

Notice: Undefined index: online in C:\xampp\htdocs\znoteaac\myaccount.php on line 144

Notice: Undefined index: name in C:\xampp\htdocs\znoteaac\myaccount.php on line 144

Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 32 in C:\xampp\htdocs\znoteaac\engine\function\users.php on line 1040

Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 33 in C:\xampp\htdocs\znoteaac\engine\function\users.php on line 1046

Notice: Undefined index: name in C:\xampp\htdocs\znoteaac\myaccount.php on line 146
 
Joined
Jul 29, 2015
Messages
243
Best answers
0
Likes
16
#13
This is a updated version wroted by me but the idea and base was formed by @Raggaer

What I did was using Znote inbuild functions for cleaner code + By an idea of @Znote of using the znote structure instead of altering the tfs original tables.

What you need to add only to the database to make it all work is

Code:
ALTER TABLE `znote_accounts`
ADD `flag` VARCHAR( 20 ) NOT NULL;
Download : http://www43.zippyshare.com/v/tpSWRg5w/file.html
Github changed made : https://github.com/Tandloze/ZnoteAAC/commit/ec5f2add006956a18bf7bf1b81eea69e5514681b

Sorry for another msg but those commits where not showing all of it but this does
https://github.com/Tandloze/ZnoteAAC/commit/9891c9859e6f9a2e89b43af7d13448cac5d07e85
dont work!
 
Joined
Sep 11, 2012
Messages
98
Best answers
0
Likes
15
#16
Well this works for - 1.5 znote aac -
And you must know what version of znote you downloaded cause if u downloaded from a post in otland ( 1.4) or you downloaded the github.com version (1.5)
 
Joined
Aug 1, 2015
Messages
138
Best answers
0
Likes
7
#17
Well this works for - 1.5 znote aac -
And you must know what version of znote you downloaded cause if u downloaded from a post in otland ( 1.4) or you downloaded the github.com version (1.5)
No one error here, but dont show the flag
 
Top