Haunted Dawg Posted January 26, 2009 Posted January 26, 2009 Any way.. havent really posted anything "good" lately. So here it is an updated event's page. What you can do is. Delete multiple events. Delete all events. Delete single events. This uses no javascript so you have no need to worry if your member's have javascript enabled or not. Soon To Come: Going to be adding a check all event's or uncheck all event's. To Install: Replace events.php with this: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Enjoy. Quote
POG1 Posted January 26, 2009 Posted January 26, 2009 Re: [mccode v2] Events Page Updated. This may be good but it won't be "mccode" friendly. For people who won't know what to do the queries will need to be changed to suit the mccode class.. Quote
Haunted Dawg Posted January 26, 2009 Author Posted January 26, 2009 Re: [mccode v2] Events Page Updated. Ahh sorry.. forgot to change it around. Will do now. Quote
Karlos Posted January 26, 2009 Posted January 26, 2009 Re: [mccode v2] Events Page Updated. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Do you mean You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. NOTE: i prefer require_once but that's not the main point :wink: Quote
Haunted Dawg Posted January 26, 2009 Author Posted January 26, 2009 Re: [mccode v2] Events Page Updated. Karlos. I am not using mccode's class.. and therefor use my own. Quote
Karlos Posted January 26, 2009 Posted January 26, 2009 Re: [mccode v2] Events Page Updated. Ahhh, yes I remember your making your own engine. Quote
Karlos Posted January 26, 2009 Posted January 26, 2009 Re: [mccode v2] Events Page Updated. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Page Bug Fixed. Quote
POG1 Posted January 26, 2009 Posted January 26, 2009 Re: [mccode v2] Events Page Updated. somewhere in the script i found this $page = abs(@intval($_GET['page'])); $page = isset($page) ? abs(@intval($_GET['page'])) : 1; why do u need abs intval on the same value twice? and isnt the page variable set on the page before to the condition will always be true.. Quote
MyGunWars Posted January 26, 2009 Posted January 26, 2009 Re: [mccode v2] Events Page Updated. I Got A But When I Added It: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
Guest Anonymous Posted January 27, 2009 Posted January 27, 2009 Re: [mccode v2] Events Page Updated. ... NOTE: i prefer require_once but that's not the main point :wink: I assume that is because you actually like information disclosure rather than a secure site? I have commented on this before but am unlikely to do so again... Use include_once Just do it .. I know you won't read the manual to find out why, I know you haven't got the experience to understand the in's and out's. Just try it. Quote
Haunted Dawg Posted January 27, 2009 Author Posted January 27, 2009 Re: [mccode v2] Events Page Updated. Wow.. actualy a post by nyna on one of my mod thread's without her complaining about the mod itself.. Quote
Eternal Posted January 27, 2009 Posted January 27, 2009 Re: [mccode v2] Events Page Updated. Note on the update it showz Nothing at current event.. Also your recent 10 events are not shown.. Good work though.. Also how is your post count 99,999,99 or so? Quote
Haunted Dawg Posted January 27, 2009 Author Posted January 27, 2009 Re: [mccode v2] Events Page Updated. Read carefully: Posts: 2011 Posts: 99,898,872 And what type of error are you having? :S Quote
Eternal Posted January 27, 2009 Posted January 27, 2009 Re: [mccode v2] Events Page Updated. bahaha fooled me.. I don't get any errors in the page. Just when you click events it shows blank events then you click 1 "PAGE 1" = The set of events from 10 up So first 10 are not viewable i know how to fix it. Just thought you should know... Also in your script the del all button not work... Quote
shedh Posted January 27, 2009 Posted January 27, 2009 Re: [mccode v2] Events Page Updated. Wow.. actualy a post by nyna on one of my mod thread's without her complaining about the mod itself.. lol don't get her started Quote
Haunted Dawg Posted January 27, 2009 Author Posted January 27, 2009 Re: [mccode v2] Events Page Updated. What browser you using? This all seem's to work completly fine on my end. And also the del all button work's perfectly fine also. It should start like this: Pages: - 0 - 1 - 2 - 3 - 0 being your last 10 event's. 1 being your second page. 2 being your third page. 3 being your fourth page. Quote
Decepti0n Posted January 27, 2009 Posted January 27, 2009 Re: [mccode v2] Events Page Updated. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Do you know what you even did there or why what you did is a bad idea? Or how it can be improved? Or what the IN() func actually does and how the way you're doing it is completely weird? Quote
Haunted Dawg Posted January 27, 2009 Author Posted January 27, 2009 Re: [mccode v2] Events Page Updated. Please explain why it is wierd. Because as far as i know. Im counting how many tickbox's were ticked because the name of checkbox is checkbox[] which form's an array. In my sql i am using the IN() so it only verifys which id to delete. Got a better way? Please post it Quote
Haunted Dawg Posted January 27, 2009 Author Posted January 27, 2009 Re: [mccode v2] Events Page Updated. Screenshot's: Quote
Karlos Posted January 27, 2009 Posted January 27, 2009 Re: [mccode v2] Events Page Updated. Use include_once Just do it .. I know you won't read the manual to find out why, I know you haven't got the experience to understand the in's and out's. Just try it. Why you say I won't read the manual to find out? I like to learn new stuff and actually I do read manuals because that how I learnt the majority of what I know, sometimes with a little bit of input from someone else, but overall I do use the manual to read and learn new stuff, maybe I won't understand it fully but this is why I joined CE, to learn new stuff. But I see why you said that because most people on here don't read manuals but others do aswell. Quote
Decepti0n Posted January 27, 2009 Posted January 27, 2009 Re: [mccode v2] Events Page Updated. @killah Fine, I'll try and explain. IN() accepts a comma separated list of values, so all of these are equal: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. What you're doing, is only putting on value in it. This: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. is equal, and clearly much better, than this: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. And using IN() with only one value is pointless since you can just use equals. You're saying "where it is in this group of numbers, and this group only contains one number" Now what you're doing with the checkboxes is fine, but you're looping over each one, so if they delete ten events, you'll run ten queries, when they can all be condensed into one. If you want a quicker way, here: From this: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. To this: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Shouuuuuuuld work Quote
Haunted Dawg Posted January 27, 2009 Author Posted January 27, 2009 Re: [mccode v2] Events Page Updated. I see your point. And you have a reason there. But i was going to go with a way like you are using. Except in a different way and it added a , at the end each time. Here is where i originated it from to try it: www.deadlykillah.com/yubi_sucks.php And thought it would give an error. I then was fiddling around with the script and used for.. but infact forgot to take out the IN() function. Test out the yubi_sucks.php script on my website.. select a few check box's and see. And with that , being there i never wanted to cause a clash in the query. Then i thought of substr(). But unfortunatly could not get that to work since it just took all the ,'s out. Thank's for pointing that out. I will post an update with updated version now. Quote
Haunted Dawg Posted January 27, 2009 Author Posted January 27, 2009 Re: [mccode v2] Events Page Updated. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Enjoy uppated one with more to it. UPDATED Quote
Lithium Posted January 27, 2009 Posted January 27, 2009 Re: [mccode v2] Events Page Updated. nice try killah, though i doubt this last version will work for anyone without a lot editing ;) Quote
ReaSonZ Posted January 27, 2009 Posted January 27, 2009 Re: [mccode v2] Events Page Updated. Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/username/public_html/events.php on line 65 You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.