Staredit Network

Staredit Network -> Staff Lounge -> Top secert
Report, edit, etc...Posted by Yoshi da Sniper on 2005-04-03 at 11:34:50
I only find it annoying that IP changes global stuff because then I have to go back into every file and see if what im looking for is globally declared, is not going to comprimise security, etc. Its a good 20 minutes for every global change, and I hate doing it tongue.gif

BTW, yes, I was already planning a ModeratorCP actually, and it will show you anything reported relevant to what you have control over.
Report, edit, etc...Posted by BeeR_KeG on 2005-04-03 at 12:23:40
Finally a good ModeratorCP in which to work with.
Report, edit, etc...Posted by (U)Bolt_Head on 2005-04-04 at 14:00:51
QUOTE(isolatedpurity @ Apr 3 2005, 06:13 AM)
(I hate suggestions... everyone is ruining all the surprises...)
[right][snapback]179378[/snapback][/right]


I'm really impressed with all the ideas you have but theres no reason to keep them secret. I would rather suggest it than find out you did something differant and then think "ohh... i should of done that"

I'm glad you though of it though.
Report, edit, etc...Posted by Yoshi da Sniper on 2005-04-04 at 18:14:59
I like suggestions. We still have a few surprises up our seleve IP, but we mainly want everyone to see what we are doing, and to suggest things to make it better.
Report, edit, etc...Posted by IsolatedPurity on 2005-04-06 at 01:11:00
More css additions, tell me if you don't like them:
td {vertical-align:top;}
ul {margin:0px;}

I hate always having to define valign="top" on table cells... it's always being used. You can always override it by declaring valign="bottom" or such.
And I hate the line breaks ul automatically gives off...

Our css file is getting pretty close to 3kb happy.gif, pretty censored.gif ing good considering our old one was 15kb and this one has more unique content in it (ie's crap adds an extra 200 bytes, it pisses me off). It's not 100% optimized yet either.


Yay! Next post starts a new page (at 40 per view). 40/view kinda gets annoying.

So, tentative postback ground function is up. It gives you background: #000 url(whatever) repeat postionx postiony;, so all you have to do is call style="{$vars->member['postback']}".
Title function coming up next, easy shit though.
*isolatedpurity draws closer to finishing usercp



Alright, more css options:
.i, .b, .u instead of <i> <b> <u>
Report, edit, etc...Posted by IsolatedPurity on 2005-04-07 at 13:52:23
Short name urls:
Upon adding a new one, I realized how the code just repeats itself, over and over and over again.
if <this>
{
if !area
{
area = view
}
id = <this>
script = <this's script>
}

So I made it automatic, relying on the "shorty" column in core_index.
An every expanding amount of lines of code squished into a few. If you wanted area to equal something else or another variable, I'll simply rewrite the way the code works.

It's more of me just playing around than anything else. Check it out (line 66-83).

Yet another benefit of our conformity in module writting.


Additional:
omgz0rz... I was laying in bed, thinking about the new code and pondered... would it be possible to do ?forums instead of ?p=forums?

CODE

$tkey = key($vars->get);
if (is_array($vars->index[$tkey]))
{
$p = $tkey;
}

elseif ($vars->shorty[$tkey])
{
if(!$vars->get['area'] && !$vars->post['area'])
{
 $vars->get['area'] = "view";
}
$tvalue = current($vars->get);
$vars->get['id'] = $tvalue;
$p = $vars->shorty[$tkey];
}

elseif (!$tkey)
{
$p = "portal";
}

else
{
$display->critical("Page doesn't exist....");
}

Could be tweaked a little I'm sure.

I think that would be sexy?
Report, edit, etc...Posted by Yoshi da Sniper on 2005-04-07 at 15:24:15
hmmm you can give it a try.
Report, edit, etc...Posted by IsolatedPurity on 2005-04-08 at 13:41:55
Oh... I don't have to try cuz I already got it working before I even suggested it (thus the code). It's even possible to kill short names entirely...
?downloads&area=whatever... = long url
?downloads=1 = short url
They would operate at the same level.

Anyways:
CODE
 
/*  Smart view count  */
  $last_views = unserialize(stripslashes($this->profile['last_views']));
  if (!in_array($vars->member['id'], $last_views) && $this->profile['id'] != $vars->member['id'])
  {
   array_unshift($last_views, $vars->member['id']);
   if (count($last_views) == 6)
   {
    array_pop($last_views);
   }
   $temp = addslashes(serialize($last_views));
   $sql->s_update("members_xtended", "pviews=pviews+1, last_views='{$temp}'", "mid={$this->profile['mid']}");
  }

*isolatedpurity giggles
I love arrays.

Changes:
..CSS
Took off the automatic vertical-align:top shit, it didn't fly as well as I hoped.
Added automatic border:0px to images.
Added row_ug (row ugly green).
..Global
Renamed all the display and sql functions.
Changed s_update to accept an array or a string for SET.
Renamed ?profile to ?member (you're fault for giving me that idea... indirectly!). It really shouldn't apply to you too much if you are using $display->parse_name.
I was just kidding about the renaming display and sql functions thing, lol.


Check profiles mod for lots of conceptual work...
I need feedback.
Report, edit, etc...Posted by Yoshi da Sniper on 2005-04-08 at 14:09:10
I was about to kill you right there biggrin.gif
Report, edit, etc...Posted by IsolatedPurity on 2005-04-08 at 14:55:18
Karma (admin reputation) = k
Repuation (member karma happy.gif) = r
Communitive posts = c (posts in the current system)
Posts = p (total posts)

k * 50 + r * 20 + c * 5 + p/2

Examples
5, 50, 400, 750
250 + 1000 + 2000 + 375 = 3625

30, 90, 100, 200
1500 + 1800 + 500 + 100 = 3900

Both groups would be near promotion if 4000 points was required for advancement. The difference is person 2 made more solid posts while person 1 simply made more posts. This is making the assumption admin karma is hard as hell to get.

Ultimate spammer?
0, 10, 500, 1500
0 + 200 + 2500 + 750 = 3450

I just popped the equation out of my ass without trying to make it to complexed. I'm sure a better one can come along from one of us... if not, I bet dt_bk could make some weird censored.gif ed up one happy.gif.

Edit: p should be total posts - c, probably.


Additonal:
Obsurity... members shouldn't see sql failures, all they need to know is the script failed for some reason. It'll add a small layer of protection against sql injection. I was trying some method's on sheemps site and I know I could have done major damage, but it was annoying as hell because I couldn't see how the queries were executing when I crashed them. I'll do this before release. I'm thinking in order to see the sql failures correctly, either be an admin or attach a get variable to the url in case you want to see it as another member group.
Report, edit, etc...Posted by Yoshi da Sniper on 2005-04-08 at 16:33:01
I cannot stress this enough, that EVERY type of user input (ANY type of $post) variable MUST BE CLEANED!

Even if its an option button, submit button, or whatever, it must not interact with anything in the database or anything major unless it is cleaned.
Report, edit, etc...Posted by Yoshi da Sniper on 2005-04-09 at 12:55:06
Just some things:

I just got forum as read almost working. Its so far better than invision. The way invision does it, it reads a cookie on your computer. If you do not have the cookie, it goes "well, too bad" and doesn't have the marking forums as new feature. My code does the cookie thing, however when it sees that the person isn't holding cookies properly, it assumes they have cookies offline, and then uses "query" mode, which manually searches read topics in forums that haven't been totally read.

It may be an extra query on the page when we wanted none, but hey, it only occurs when someone doesn't have cookies on, which is maybe 1 in every 100 members.



Okay so, anyways. Additionally:
- For the other content systems like tutorials and files, lets have them marked as unviewed for up to a week (since there are not near as many as posts). This would be extremely unique. It would not be necessary for something like shoutbox, as that doesnt need shoutbox items marked as new.
- For shoutbox, you should be able to define the # of shouts in the global one (up to 20 maybe). All you do is calculate height by shouts on global page * pixels a line done.
Report, edit, etc...Posted by IsolatedPurity on 2005-04-09 at 13:17:55
Inserting hundreds of rows into a database because a user doesn't have a basic browser component enabled is not the anwser.
Whether or not a forum has a new post icon or not is a rather complex equation you really can't do dynamicly because of constraints on the server. You can not have each forum cycle through x topics to see if the user already read them in order for it to get a new post icon or not.
Cookies are needed to mark a forum as read. Even if you read an entire forum and have 0 new posts to look at, the forum will still have a new post icon in forum view until you mark it as read. This isn't a flaw, it's necessary.

Even if there's cookies or not, you'll probably still have to insert a row into topics_read for each readable topic.


Other content systems don't need the ability of finding new content or not.

Already planned for the shoutbox... although I was thinking height would be another configuration and not automatic. You can have 20 shouts in the current height without too much of a problem. The higher intergration with the parser will be nice, instead of hacking the code to kill certain bbcodes and such inside the shoutbox code.
Max limits will still be rather small... because the shoutbox main will have the ability to be configured higher. And the shoutbox main will NOT have two shoutboxxes on the same page like currently... loading shoutbox main will not load the global shoutbox too.
Report, edit, etc...Posted by Yoshi da Sniper on 2005-04-09 at 16:53:32
Oh yeah, one more thing:
I've learned a lot about GD library in the last week. I got plans to munipulate images on this site.

One of my plans, actually is to have some forums, if you add attachments, to automatically put a small URL link, www.staredit.net at the bottom corner of each image.

It's a pretty cool idea, and only applies to some forums, such as the mapping forums. I've noticed that more and more sites are starting to use images posted in that forum, and we should get some credit for hosting em happy.gif



Plus we can maybe automatically attach some sort of staredit.net url on each of the hosted map screenshots (unless the author unchecks a box, because it will be optional). Automatic, of course, however you decide if you want this. I definately at least want it for the mapping forums, to automatically attach screenshots.

That way, in the future if we have more bandwidth we could offer maybe 300 kb of off-site image hotlinking, so people can view images from whereever on their map making projects.
Report, edit, etc...Posted by IsolatedPurity on 2005-04-11 at 08:23:49
Wrote the cache function. You'll still find it in sql abstraction class. You'll need to write out the whole query. Why? Because not all caches will need all data from a table. For example, SELECT name,id FROM... would still have power in a highly dynamic table where name + id doesn't change, but the other 20 columns constantly do.
function cache($skey, $name, $query)

Tomorrow I plan on playing inside the session class. I'll be composing an array and a function to get total online users and users inside specific script sections. While I'm doing that, I'll be killing the Left Joins on clans + groups because it was replaced with the caches a long ass time ago, hopefully you changed any scripts revolving around it by now.

I'll also start on cron a bit tomorrow. It'll probably be broken into two sections: priority and non priority updates. For example, the sessions delete query will be no where near a tasks database, because if the server crashes or something, it will automatically pick up where it left off anyways. It makes no difference if it doesn't run during a crash or something anyways. Most queries will be of this type. Important queries like game queries will be backed up by a task database, still trying to think of how exactly to do this.

Seriously at least attempt to do "mark as read" a different way.
Report, edit, etc...Posted by Yoshi da Sniper on 2005-04-11 at 11:40:52
QUOTE
Seriously at least attempt to do "mark as read" a different way.

Okay, what I could do:
- Have a colomn in members for a serialized forums that you have last marked as read. (requires no query).
- Make a new table for forums marked as read. (requires extra query if no cookie).

Both will not require topics_read to do a mass insert.
Report, edit, etc...Posted by IsolatedPurity on 2005-04-12 at 21:35:38
First one sounds alright. You could even combine the two... if no cookie support, use the member column. If you want the ability to switch computers though, the first one is probably the best.
One thing I hate about invision if you click on the little green box to go to the last unread post and you haven't previously read the topic yet, you get sent to the bottom.


More ideas:
Forum: The Void. Subforum of garbage or something. Deleted topics and such get sent here. No one can reply to topics sent here. It would be a good place to move topics inside clan forums that are killed.

Deleted Members: Like blizzforums, some type of banishment system. Members don't get deleted, they stay in the database as killed members. All other data like active games and such get deleted though.


Report, edit, etc...Posted by Yoshi da Sniper on 2005-04-12 at 23:00:53
Actually deleted topics leave a marker in the forum if you wish to. Just as good of a feature.

Alright with the member not delete feature, but at least make sure we can clear out posts in one click with it.


To everybody else: I will not be as active or working on SEN v5 for the next week because I have a big client project I am programming. I'm on a tight schedule, so I will continue my duties after then.
Report, edit, etc...Posted by IsolatedPurity on 2005-04-13 at 01:45:11
Hmmm... That could work I guess. Just as long as admins and super globs (maybe) could still browse and search through such deleted topics for references.

I'm kinda jealous of the project you got... no one's giving me any sad.gif.
Report, edit, etc...Posted by IsolatedPurity on 2005-04-13 at 06:40:22
So I was working on the usercp to grap the last 5 topics I've posted in.

As I making sure the query worked, I noticed one topic was locked because "Because ur gay." So I grapped all the posts in that topic and noticed the one before you locked it was by me: "out of sync happy.gif".
Hmmm? ermm.gif happy.gif
Report, edit, etc...Posted by Yoshi da Sniper on 2005-04-13 at 07:30:51
Theres a few things that are out of sync that I must repair.

No worries, it shall be fixed I say.
Report, edit, etc...Posted by IsolatedPurity on 2005-04-14 at 20:31:39
Control Panel and Profiles are drawing close to being finished, I'm remodeling how the gallery is set / displayed and then I just got to tidy up the code, add security, and wait for other mods to finish before totally finishing up (messenger, dldb, forums).

One thing I'm not sure about is allowing guests to view profiles. If I don't, then I wouldn't have to worry about email harvesters grapping messenger contact information, taking out special links such as "request friendship" and other membership required links, as well as denying the ability to post comments because they are already denied from the script. If I do though, I don't see any benefits besides basic impression... maybe search engine (google especially) looking at the pages? I'm leaning toward just denying them from profiles, but I'd like your thoughts on this.

I've made up my mind, IE is just going to load a seperate css file completely. This will allow greater functionality because we won't have to worry about css compatability inside the css file itself. In a way, it'll be more annoying but then it'll just be easier than trying to find the perfect code that IE and FF both like.

Report, edit, etc...Posted by Yoshi da Sniper on 2005-04-14 at 21:58:26
QUOTE(isolatedpurity @ Apr 14 2005, 08:31 PM)
Control Panel and Profiles are drawing close to being finished, I'm remodeling how the gallery is set / displayed and then I just got to tidy up the code, add security, and wait for other mods to finish before totally finishing up (messenger, dldb, forums).

One thing I'm not sure about is allowing guests to view profiles.  If I don't, then I wouldn't have to worry about email harvesters grapping messenger contact information, taking out special links such as "request friendship" and other membership required links, as well as denying the ability to post comments because they are already denied from the script.  If I do though, I don't see any benefits besides basic impression... maybe search engine (google especially) looking at the pages?  I'm leaning toward just denying them from profiles, but I'd like your thoughts on this.

I've made up my mind, IE is just going to load a seperate css file completely.  This will allow greater functionality because we won't have to worry about css compatability inside the css file itself.  In a way, it'll be more annoying but then it'll just be easier than trying to find the perfect code that IE and FF both like.
[right][snapback]187829[/snapback][/right]

I think that you should allow guests access to profiles. Sometimes they want to see who certain people are and so on.

For the CSS thing. Instead of having 2 totally seperate CSS files, have 3. One is the global one (cross browser compatible), another is for IE specific things and the other for FF specific things.

That way, we dont have to edit 2 files all the time.
Report, edit, etc...Posted by IsolatedPurity on 2005-04-15 at 00:30:24
Maybe guests could just have a quick snapshot of the profile or something? Well, do think guests need to see people's journals, personals, etc?

I'd rather not have two embedded css files... Once the css file is completed and split apart, you wouldn't be doing to much in it anymore anyways.
Report, edit, etc...Posted by Yoshi da Sniper on 2005-04-15 at 07:35:28
Sometimes other sites link to peoples profiles. I have never really restricted guests, except for uploading content, and seeing games. I'd like to keep the tradition, because restricting them is only forcing them to sign up, which I never want to do. Registration is a choice.
Next Page (4)