DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • October 20, 2018, 05:25:56 AM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: 1 [2] 3 4   Go Down
  Print  
Author Topic: lays system  (Read 12107 times)
0 Members and 1 Guest are viewing this topic.
Rowne
Guest
« Reply #15 on: December 06, 2004, 06:34:29 PM »

Hee, I think that'd be absolutely hilarious because as I said, my users tend to be good natured and it gives them something to laugh at.  They love Lonny's Castle.  I had pipe-lickers and ghost-whackers who were constantly trying to get the custom titles, regardless of how foolish they looked because they knew in the end, it was a laugh and they just had fun with it.  This is pleasing to me.  I know LoGD isn't very serious in the first place but I'm all for busting the game's fourth wall and messing with it even more so yes, I wholly support the Pimp title.
Logged
Dopple
Guest
« Reply #16 on: December 06, 2004, 07:32:41 PM »

Hex, I've gone ahead and uploaded the version I threw together into my shared folder.. it has the HoF integrated into the module itself and is using the module prefs.  It still needs a tweak or two to the HoF part to allow other modules using the same method to work correctly, and I didn't do anything fancy with the table, but it seems to work.   Wink
Logged
Kendaer
Guest
« Reply #17 on: December 06, 2004, 08:06:47 PM »

Please note, this will BREAK in the upcoming pre-release.

I have said for a VERY LONG TIME that people are not supposed to be adding columns to the accounts table or any of the central tables.

As part of the installer work which has been done, the code now *maintains* these tables as part of the upgrade/installation function and will ACTIVELY REMOVE any columns which are not defined in the table definition as part of the table.

This was necessary so that automatic upgrades where fields were removed or renamed would proceed correctly.  It has the side-effect of enforcing something we have always stated was the case.  The core tables are the core tables.  Modular extensions should make use of the module_userprefs tables.

This is no longer just good practice folks.  As soon as I release the next prerelease (within a day or so, pending final validation of a last couple of fixes to current code bugs), you will be in serious doodoo if you depend on having added fields to any of the tables!!!
Logged
Hex
Guest
« Reply #18 on: December 06, 2004, 08:13:32 PM »

thanks for the info, (good to know for the future) but as I said previously, the moduleprefs version (2.0) is sitting in my shared folder.

just so there's no confusion..


btw, will this affect other tables, such as the tables lonnys forums creates?
Logged
Sichae
iMod God
SVN Users
Mod God
*
Offline Offline

Posts: 3458


If ya didn't get it by now... you're hopeless...


View Profile WWW
« Reply #19 on: December 06, 2004, 08:31:48 PM »

"I have said for a VERY LONG TIME that people are not supposed to be adding columns to the accounts table or any of the central tables."

Guessing that it will only effect columns that are added to existing tables.
Logged

If you didn't understand anything in the above post, don't try to attempt anything suggested.

Kendaer
Guest
« Reply #20 on: December 06, 2004, 08:39:15 PM »

Quote
btw, will this affect other tables, such as the tables lonnys forums creates?

Quote
Guessing that it will only effect columns that are added to existing tables.

This only affects 'core' tables (modules, module_userprefs, accounts, etc).
It does NOT affect tables created by modules (such as drinks or bounties, though I fully intend to revamp those modules to use the table descriptor code in the future as this would make them more easily able to handle future upgrades to tables)

It will not remove tables created by other modules or such (IE, lonny's forums should be safe as long as he doesn't modify any of the core tables Smiley)

« Last Edit: December 06, 2004, 08:46:04 PM by Kendaer » Logged
Dopple
Guest
« Reply #21 on: December 06, 2004, 08:45:28 PM »

Hmm, table descriptor code?  This sounds interesting... Smiley

Definitely good news to me, the modules I'm currently making rely rather heavily on added tables (much as I hate them to, but it'd cause lots of both code and data bloat otherwise).
Logged
Kendaer
Guest
« Reply #22 on: December 06, 2004, 08:47:28 PM »

The descriptor code itself is already part of the current pre-release.  There's just no documentation on using it or setting it up.

Not that there will be much in the next release either, but you'll at least have some examples in how the installer works!
Logged
Dopple
Guest
« Reply #23 on: December 06, 2004, 09:46:27 PM »

Way ahead of you.. it does look interesting, and the documentation doesn't look too bad.  Thanks for mentioning it.  *mental gears begin turning...*
Logged
Hex
Guest
« Reply #24 on: December 06, 2004, 10:23:41 PM »

Updated to ver 2.1

Now it adds a nav to the HoF page for most lays.

only sorts most to least for now. I do hav plans to add sorting at a later time.

note, if you've got a ton of players, they're all going to be listed on the same page for now. I'd like to include a way to list X players per page. the only way around this right now is in the module settings, you can limit the number of players displayed.

I've tested this as much as I can, but I cannot guarantee you will not run across any errors. *fingers crossed*

Enjoy! Smiley  download link is the same
Logged
Dopple
Guest
« Reply #25 on: December 06, 2004, 10:42:50 PM »

I ended up using some code from hof.php in order to handle the sorting and paging...  The tough part is remembering to update the navs to keep track of the current choices.  It would be nice if the table display function in hof were in an include file or something...  Wink


I did completely forget that you can define new names for tables inside an SQL statement.. thank you for reminding me of that little trick.
Logged
Hex
Guest
« Reply #26 on: December 06, 2004, 10:58:54 PM »

I was just going to include sort navs, use a variable $sort, and replace the ORDER BY statement with that

something like

Code:
if($sort=="most"){
   $sort2 = " ASC";
}elseif($sort=="least"){
   $sort2 = " DESC";
}

$sql = "blah blah blah ORDER BY $sort2";

*shrug* that's how I was doing it before, till I got frustrated and deleted all the code from the active window and clicked save =)  wasn't working anyway. maybe it will this time.

well, 2am, my woman is probably cold and lonely by this point so I'm outtie.
Logged
Rowne
Guest
« Reply #27 on: December 07, 2004, 05:26:15 AM »

I have it installed and everything's dandy.  Now to sit back and watch the fight for 'Pimp of the Land.'  Oh dear, this is going to be fun.

Anyway, no problems here and thanks for switching to module prefs and all.  This is a really nifty addition to have here.

Of course, anything that ups the quotent of LoGD goofyness is a good thing to have on any LoGD server.

[Edit] I'm impressed with how you've worked the hooks there, Hex, I must say.  When hooks are used and it's handled so cleanly I don't mind patching files in the least.  In fact, I thought I'd try adding it to (Kallell/Sichae's) Ge'Mah's Relaxation Retreat.

That went spiffingly well too.  I made sure I put the hooks in the right places and I roped in some of my userbase to help me test it out.  So both lovers (as patched by the diff on the first page) and the brothel both work perfectly with Lays.  So a resounding well done to your clean code, which made this easy for one such as I (who's so new to PHP) to do.

If anyone's curious (and in the spirit of sharing), it can be found here [http://mastaile.mine.nu/brothel.php].  All I did was add in the hooks at what seemed to be the correct locations.  I've also removed the sex checks and unisexualized the descriptions too ~ as this seemed to be desired by my users.  That's easy enough to undo though.

If anyone wants, I'll try and make a diff.

Anyway, credit this to Hex's efforts, it's good code he's got there.  *Nod.*
« Last Edit: December 07, 2004, 12:54:50 PM by Rowne » Logged
Hex
Guest
« Reply #28 on: December 07, 2004, 08:39:00 PM »

just updated to ver 2.2

lots of changes
added a bunch of admin configurable options for just about feature

top pimp added!
also changed the lays stat display from global to per user

changelog:

v2.2 - 12/07/04
- Added server pimp stuff
- admin configurable titles for males AND females
- option to display top pimp on login page
- added option to change player titles
- fixed top pimp code to display the real top pimp <g>
- Added ability to turn on/off HoF (why the HELL would you want to do that?!)
- added 'howmany' pref. for future plans
- made 'show lays in info bar' per user, not systemwide anymore.
Logged
Bandon
Member
Militia
**
Offline Offline

Posts: 91



View Profile WWW
« Reply #29 on: December 08, 2004, 12:39:41 AM »

So at this point, will this or will this not work with the new pre-release that is coming up?

I would really like to add this to my site, but not if it is just going to break...

 Huh

-Bandon
Logged

Abandon all hope, no, really, abandon it.
Pages: 1 [2] 3 4   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Please take the time to read the FAQ and browse the DragonPedia

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
60 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search