search -  faq -  rulez -  staff

forums






map cycle
irc              pwnalizer
voice         dswp bar




Register

Login


It is currently 12.22.24

 

All times are UTC + 1 hour




Post new topic Reply to topic  [ 155 posts ]  Go to page Previous  1 ... 9, 10, 11, 12, 13, 14, 15, 16  Next
Author Message
PostPosted: 02.22.12 
Offline
Godlike

Joined: 03.29.10
Posts: 1447
-----tdm:  
nick: Pirat
skill: 507.365
kills: 402
deaths: 636
ratio: 0.63
wurst wrote:
yea.
we have automatic backup btw, db and flies

Hopefully, we won't have to make use of it in my clumsy and unillumined
attempts to merge our databases. ;-}

.



 


Top
 Profile  
 
PostPosted: 02.22.12 
Offline
Godlike
User avatar

Joined: 06.26.09
Posts: 674
Pirat wrote:
havoc wrote:
just add a table for comments with these columns:

comment id
map id
date/time
user id/name/whatever
comment text
type of comment

with type of comment being one of 3 - a pro, a con, or just comment
[...]
p.s. your primary in the maps table should be the map id

AFAIK, this won't work, as in your table, there is more than one row
for each map (because there can be more than one comment per
map). Therefore, the map id is not unique and thus cannot act
as a primary key.

Would should work, however, is using a composite primary key that
comprises all columns. I'll probably use such a key for all of my
tables except for my main table where the map name/id is the
primary key.



i think you are confused or something m8...
in your table the primary must be the map id, in my table the primary must be the comment id, with map id marking which comment is related to which map.

_________________
"It is the first responsibility of every citizen to question authority."
-- Benjamin Franklin



 


Top
 Profile  
 
PostPosted: 02.22.12 
Offline
Godlike
User avatar

Joined: 06.26.09
Posts: 674
Pirat wrote:
List data for the maps are stored in other tables, like urtmaptags,
urtmapauthors, urtmaplicenses (a map can be dual-licensed, for
instance), urtmapdownloads, etc.


you are definitely doing something wrong.
you only need 2 tables - one for the maps one for user feedback.
urtmaplicenses? dont know about overengineering but you are overdoing something :)

_________________
"It is the first responsibility of every citizen to question authority."
-- Benjamin Franklin



 


Top
 Profile  
 
PostPosted: 02.22.12 
Offline
Godlike

Joined: 03.29.10
Posts: 1447
-----tdm:  
nick: Pirat
skill: 507.365
kills: 402
deaths: 636
ratio: 0.63
havoc wrote:
Pirat wrote:
havoc wrote:
just add a table for comments with these columns:

comment id
map id
date/time
user id/name/whatever
comment text
type of comment

with type of comment being one of 3 - a pro, a con, or just comment
[...]
p.s. your primary in the maps table should be the map id

AFAIK, this won't work [...]

i think you are confused or something m8...

I always am, but your description was simply ambiguous.

havoc wrote:
in your table the primary must be the map id, in my table the primary must be the comment id, with map id marking which comment is related to which map.

Aaaah, okay, so you mean this:

  • table "urtmaps":
    non-list map data (map id, filesize, ...), PK: map id
  • table "urtmapdata":
    each row is a comment with the fields you mentioned, PK: comment id.

Was that your suggestion? If no, please explain in detail.
If yes: hooray, no misunderstandings anymore! :-)

.



 


Top
 Profile  
 
PostPosted: 02.22.12 
Offline
Godlike
User avatar

Joined: 06.26.09
Posts: 674
ok will try to explain. first of all heres a screenie so we all see what we talking about:

Attachment:
Screenshot-1.png


so given thats the supposed final result, how that translates into db? here goes:

map id - int, pk, a.i. - first we need this, a unique marker for every record (map) in the table
map name - varchar, the name of the map, like "Slumwar"
map file name - varchar, ut4_slumwar.pk3
map image - varchar, a screenie for the map
map modes - varchar, you will keep here a serialized array of the selected modes (see serialize in php docs). think of checkboxes
map size - varchar
file size - varchar, you can get that while uploading
author - varchar, you can make an ajax dropdown google suggestions style for easier data entering. oops - forgot - no ajax.
download - varchar, you can put a textarea and parse every url to a "Site1", "Site2" and such. tho id suggest theres only one download link and it points to a file somewhere on dswp. theres nothing as annoying as dead links.
home - varchar, input type = text
license - text - not sure you really need comments on the license there. better off without them
comments on tdm ffa and such - not sure you need that, it bloats the structure and gives you nothing. better off without them too.
pros, cons and notes - the user comments, will go to the other table

one more thing:
date added - a datetime, autodate for when this map is added

thats pretty much the map table columns
the comments table i pretty much already explained, nothing to add there really


You do not have the required permissions to view the files attached to this post.

_________________
"It is the first responsibility of every citizen to question authority."
-- Benjamin Franklin



 


Top
 Profile  
 
PostPosted: 02.22.12 
Offline
Godlike
User avatar

Joined: 06.26.09
Posts: 674
so ye, with both those tables, its kinda everything you need, + some php magic.
the rest is include the necessary phpbb files, and get the user session data, so you can check if they are logged and able to comment etc, and add automagically their name to their comment. and thats it - the map thing is ready.

_________________
"It is the first responsibility of every citizen to question authority."
-- Benjamin Franklin



 


Top
 Profile  
 
PostPosted: 02.24.12 
Offline
Godlike
User avatar

Joined: 07.15.08
Posts: 4648
Location: Behind U
-----tdm:  
nick: [dswp]GewitterOma
skill: 1122.83
kills: 25960
deaths: 19847
ratio: 1.30
-----bomb:  
nick: [dswp]GewitterOma
skill: 812.172
kills: 3885
deaths: 3541
ratio: 1.09
including phpbb means hooking it in template.

check 1.) ./whoswhere.php
its calling 2.) ./styles/blackbox_blue/template/whoswhere.html
there inside u find some

<!-- PHP --> include("http://www.dswp.de/old/dswp_tools/svarox/whoswhere_session.php"); <!-- ENDPHP -->

thats it, ure hooked.
check other files in template dir, maybe sort by chaned date to see the last trys...
eg. in xlr_stats.html u can see blinky passing GET variables.
its not elegant and its doing double stats.
its however working pretty ok, maybe u have a better way.

ah, ask xtj for anything with phpbb if google dont know the answer...

_________________
Image



 


Top
 Profile  
 
PostPosted: 02.24.12 
Offline
Godlike
User avatar

Joined: 06.26.09
Posts: 674
for a beginning he only needs to check if the user is logged, i.e. include the common includees and see the session stuff.

http://www.phpbb.com/kb/article/phpbb3- ... tegration/

this one is short and to the point.

Code:
<?php
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
?>

Your existing page goes here


Code:
<?php
if ($user->data&#91;'user_id'&#93; == ANONYMOUS)
{
   echo 'Please login!';
}

else
{
   echo 'Thanks for logging in, ' . $user->data&#91;'username_clean'&#93;;
}
?>
 

_________________
"It is the first responsibility of every citizen to question authority."
-- Benjamin Franklin



 


Top
 Profile  
 
PostPosted: 03.01.12 
Offline
Godlike
User avatar

Joined: 06.26.09
Posts: 674
i think pirat left us for good

_________________
"It is the first responsibility of every citizen to question authority."
-- Benjamin Franklin



 


Top
 Profile  
 
PostPosted: 03.03.12 
Offline
Godlike

Joined: 03.29.10
Posts: 1447
-----tdm:  
nick: Pirat
skill: 507.365
kills: 402
deaths: 636
ratio: 0.63
havoc wrote:
i think pirat left us for good

Nooooooooooooo! If I would, you would read in the news about it. ;-}

Sorry for my seeming procrastination, but I was (and to some extent, still am) quite
busy with my job and other things.

Will take care of it soon, promised!



 


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 155 posts ]  Go to page Previous  1 ... 9, 10, 11, 12, 13, 14, 15, 16  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Imprint

Powered by phpBB © 2000, 2002, 2005, 2007, 2008, 2009, 2010 phpBB Group

Skin by Lucas Kane
we use apache2 mod rewrite with phpBB SEO
map train_beta1-100 © 2009 by SteveMcQueen
Statistics Backend + Database by XLR Stats and B3 Bot
mapvote robot and gameserver monitor © 2009 by BlinKy
mumble viewer Copyright © 2008 Dominik Radner (aka Urmel)
mumble switcher and integration © 2008 by XTJ7, Unclefragger and Wursti
Localisation Plugin © 2009, Team Leads Plugin © 2009 and Knifer Plugin © 2009 by SvaRoX
for our stats we use Chart.js Copyright (c) 2013-2015 Nick Downie.
the stats also use some jQuery jQuery v2.1.4 | (c) 2005, 2015 jQuery Foundation, Inc.



voice server
top 20 players


nameskillkills
-Dws.BLINGBLING*-*1730.63418631
NormaSnockers1865.75400492
Zottel1760.8276378
make.them.suffer1846.17269872
>8v=1825.35230156
moon1777.56195615
sjas1692.49192315
peace1878.86190660
Wagner_Moura1562.9188001
Goomba1859.75182677
z0rn1608.41181016
Mad1803.76179124
[dswp]PLZ1847.85178516
Graf_ZahlIII1835.73167407
Zohan1611.07159737
ubercunt1634.93159240
Yarrr!1917.33156233
I_am_nOOb1909.64151268
Pandageddon1891.75148319
Pirat1664.08145798