Coding discussion

Chat about anything and everything non-Etrian related!

Moderator: ItL Moderators

User avatar
Maxine MagicFox
ItL Webmaster
Posts: 13474
Joined: Wed Feb 27, 2008 12:20 pm
Location: Pennsylvania
Contact:

Re: Coding discussion

Postby Maxine MagicFox » Thu Mar 07, 2013 2:11 am

Really? You might need to uninstall certain features? I've never had problems with it.

Anywho, I'M DONE!! with the design anyways. Maybe a little more over the top than it originally started out to be, but OH WELL! I like it :3

Enjoy this series of images from conception of the design idea to the completed design~



I might still tweak some of the colors or the fonts, but overall I'm quite happy and it's time for me to get back to focusing on php coding. I will wait to chop this up later after the coding is completed. Just in case there are things that I want to change after I've done the hard ass work.

[] - [] - [] - []

User avatar
Riseatrance
Manticor
Posts: 2098
Joined: Thu Apr 10, 2008 3:43 am
Location: Hong Kong
Contact:

Re: Coding discussion

Postby Riseatrance » Thu Mar 07, 2013 11:27 am

Maybe doing concept art on pen and paper might be a more prudent idea. Looks like you were drawing it with a mouse or something? :V
My current game projects:
茨心 -Thornheart- (jRPG, yuri) || Heaven's Kiss: Fallen Hydrangea (Twine, yuri romance)

(#dota2) I support Team DK! 国土無双 (LaNm), you will be missed...

Follow me on Twitter at !
3DS - 3883:5561:7702 (Please msg me on Twitter/here/Skype if you add me!)
PAD - 201,267,866 (Japanese Servers. Common Leaders: Archangel, Ganesh)

User avatar
Maxine MagicFox
ItL Webmaster
Posts: 13474
Joined: Wed Feb 27, 2008 12:20 pm
Location: Pennsylvania
Contact:

Re: Coding discussion

Postby Maxine MagicFox » Thu Mar 07, 2013 12:57 pm

^_^; Yeah. But trust me when I say that my pen and paper artwork isn't a whole lot better. Granted, these aren't really suppose to be all that accurate or to scale. It's just to get a rough idea down and see if I like the basic concept. Sometimes what's in my head doesn't always come through in real life XD

[] - [] - [] - []

User avatar
Kimiko
Manticor
Posts: 6044
Joined: Wed Jun 18, 2008 9:31 am
Location: Leiden, Netherlands, EU
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Coding discussion

Postby Kimiko » Thu Mar 07, 2013 4:22 pm

Use a pen/tablet and combine your paper and digital powers :)
Kimiko

Rewatching: Beast Player Erin


User avatar
Wave-tan
Bloodant
Posts: 203
Joined: Mon Dec 27, 2010 7:23 pm
Location: Multinational
Contact:

Re: Coding discussion

Postby Wave-tan » Thu Mar 07, 2013 6:48 pm

Wave-tan | Administrative Overlord
Waveform Development Circle
waveformfeedback@gmail.com
There's no kill like overkill

User avatar
Maxine MagicFox
ItL Webmaster
Posts: 13474
Joined: Wed Feb 27, 2008 12:20 pm
Location: Pennsylvania
Contact:

Re: Coding discussion

Postby Maxine MagicFox » Fri Mar 08, 2013 4:11 am

^_^ LOL, thanks

... currently learning how to do pagination.......... from an article that I wish was written a little clearer, but it has code provided.

[] - [] - [] - []

User avatar
Maxine MagicFox
ItL Webmaster
Posts: 13474
Joined: Wed Feb 27, 2008 12:20 pm
Location: Pennsylvania
Contact:

Re: Coding discussion

Postby Maxine MagicFox » Sat Mar 09, 2013 12:36 pm

So, that article talking about pagination turned out to be a total fail - it ended up NOT being what I wanted, but it did at least give me a good start (and for some reason I still keep referencing it *sigh* )

I have a question, I'm trying to figure out how to hide the "previous" and "next" buttons for the blog when users are reading it. The "next" button isn't a big problem. I can tell that to not execute when the page is on 0, but I'm having trouble telling the previous button to get lost.

I have a rough idea that I can't even put into words yet because I'm not too sure yet where I'm going with it, but I have a more simple question:

mysql_num_rows($result);

^ is this a big resource drain? I mean for a database with only 50 records I'm sure it's not, but as the database gets bigger, if I tell this to execute every time a new paginated-page is loaded, is this something that could cause problems when the database gets much much bigger? I don't want a long load time just because it's checking how many records is stored.

Edit (me TRYING to put the idea into words): My idea I THINK is roughly maybe something like

$row_count = mysql_num_rows($result);
$records_per_page = 5;
$page = 0 //increases each click of a pagination button
$totalpages = Ceil($row_count/$records_per_page)

if ($page > $totalpages)
{
echo "<a href="url$page+1">Previous</a>";
}


This is probably sloppy as hell at the moment but it's what's floating through my head. I'll clean it up later or find the hole in it, but it's just to give you an idea of what I'm THINKING about... I can't SEE any holes in the idea yet.... Also, I abbreviated some stuff and I can't remember if I spelled "Ceil" correctly, so forgive the minor things. It's the idea I'm after. Be glad that this is cleaned up as compared to what's in my notes.

[] - [] - [] - []

User avatar
negzee
ItL's resident princess
Posts: 4049
Joined: Sun Aug 31, 2008 6:45 pm
Location: Minnesoouuda
Contact:

Re: Coding discussion

Postby negzee » Wed Mar 13, 2013 3:32 am


User avatar
Maxine MagicFox
ItL Webmaster
Posts: 13474
Joined: Wed Feb 27, 2008 12:20 pm
Location: Pennsylvania
Contact:

Re: Coding discussion

Postby Maxine MagicFox » Wed Mar 13, 2013 3:58 am


[] - [] - [] - []

User avatar
negzee
ItL's resident princess
Posts: 4049
Joined: Sun Aug 31, 2008 6:45 pm
Location: Minnesoouuda
Contact:

Re: Coding discussion

Postby negzee » Thu Mar 14, 2013 3:26 pm


User avatar
Maxine MagicFox
ItL Webmaster
Posts: 13474
Joined: Wed Feb 27, 2008 12:20 pm
Location: Pennsylvania
Contact:

Re: Coding discussion

Postby Maxine MagicFox » Thu Mar 14, 2013 9:50 pm

Sure! I get ya.

mysql_result($queryrcdnum, 0, 0);
Can you walk through this a little bit for me since it's the first time I'm seeing this particular script? What are the 0,0 for?

[] - [] - [] - []

User avatar
negzee
ItL's resident princess
Posts: 4049
Joined: Sun Aug 31, 2008 6:45 pm
Location: Minnesoouuda
Contact:

Re: Coding discussion

Postby negzee » Thu Mar 14, 2013 10:21 pm


User avatar
Maxine MagicFox
ItL Webmaster
Posts: 13474
Joined: Wed Feb 27, 2008 12:20 pm
Location: Pennsylvania
Contact:

Re: Coding discussion

Postby Maxine MagicFox » Fri Mar 15, 2013 4:11 am

Awww ^_^ I see. Ok. I'll update my codes.

[] - [] - [] - []

User avatar
Maxine MagicFox
ItL Webmaster
Posts: 13474
Joined: Wed Feb 27, 2008 12:20 pm
Location: Pennsylvania
Contact:

Re: Coding discussion

Postby Maxine MagicFox » Sat Apr 13, 2013 9:12 pm

So, hey, negzee. Remember you told me to not mix mysql and mysqli and to choose between the two:

Well... ^_^; I tried thinking (stupidly) that I just needed to add an extra letter... but apparently... no.

:\ Umm... I did a little research but I feel that I'm in over my head in this area. Do I REALLY need to use mysqli here in these codes? I mean I have them working in the one area that I wanted them. I don't need the extra security in just making sql calls, do I?

And how would I code the new codes you gave me in the mysqli method if you do feel that I need to use this?

[] - [] - [] - []

User avatar
negzee
ItL's resident princess
Posts: 4049
Joined: Sun Aug 31, 2008 6:45 pm
Location: Minnesoouuda
Contact:

Re: Coding discussion

Postby negzee » Sun Apr 14, 2013 1:24 am

No, you don't need to use the mysqli API, but with the old mysql API you won't have access to some of the more useful functionality such as prepared statements.

The differences for basic operations are minor, and you really should choose mysqli or PDO over mysql unless you're dealing with an impenetrable pile of legacy code.



[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
68 posts

Return to “Discussion Section”

Who is online

Users browsing this forum: No registered users and 37 guests