Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Nao
10231
Features / Re: New revs
« on September 29th, 2010, 10:14 AM »
Yeah, array_flip() could be beneficial. And instead of isset(), we could use !empty(), so we could actually set perm values to something else than just on/off: numbers, for instance... Like in 'max number of PMs allowed in your box', things like that. I'm not a perm specialist, though.

rev 167
* Updated to SMF rev 10144:
 ! Fixed missing global $smcFunc in prepareIndexes function (SearchAPI-Custom.php)
 ! $smcFunc['db_list_indexes'] was broken for SQLite. (DbPackages-sqlite.php)
 - removed getOuterHTML(), outdated javascript function (script.js) [Bug 4284]

- removed an extra getOuterHTML declaration which was not even used anymore... (repair_settings.php)
- removed getInnerHTML and setInnerHTML declarations, to encourage modders to use the proper way (innerHTML property.) (script.js)
- rewrote a couple of files that were still using getOuterHTML... Dunno if these files will be of any use one day anyway. (latest-packages.js, latest-themes.js)
! IE6 wasn't showing the hover color on menu items that had no submenu. (ie6.css)
* Spacinazi. (ManagePaid.template.php)
10232
Features / Re: New revs
« on September 28th, 2010, 01:33 PM »
Quote from Arantor on September 28th, 2010, 11:44 AM
Quote
That's probably because we don't take code for granted, even our own.
I try not to, because I try to be mindful of the consequences of changing things.
You shouldn't worry about that too much. We're both capable programmers and we're both checking each other's code. Meaning that 90% of our errors are spotted by ourselves -- and the remaining 9% have a chance of being caught by the other. I'm leaving an extra 1% for future users to play with ;)
Quote
I initially thought I missed it, then I edited to say I hadn't, because of the unset items - which were in the original mod too. I missed your edit, it seems.
Yeah, we tend to edit too much :P
I also caught a message of yours on another topic, that you'd posted 2 minutes before me, and I didn't get the "Another message was posted" warning when sending it... I'm a bit surprised. Or maybe I just disregarded the message, I don't know. I'll have to answer it.
Quote
Yes... I see I wasn't clear with what I meant. I set it up so that users who would have ban permissions, would also gain by default the view-all-IPs permission in the templates and in installation, since if you have the ability to ban it follows that you probably should have view all IPs too.
Oh... Right. If it suits you then :)
I'm not sure exactly, but checking perms is a fast process, isn't it? I think that once perms are loaded for someone, they're cached.
Quote
There's a thought, actually... ban user does also use the IP in the ban dialogue. I don't think I hit that one.
Want me to look into all of the 'ip' occurrences in the code? (I think I might have better things to do today, though :P)
Quote
Yeah, I think so. I've found being a programmer makes me very good at some things - breaking down tasks and so on, but lousy in others - trying to communicate a complex concept to non-technical users (like with the help string) will tend to break down.
I'm not very good at that too. But I'm very good at bugging people :P Just make the text shorter and more vague! As if you were writing my résumé! :angel:
10233
Features / Re: New revs
« on September 28th, 2010, 11:35 AM »
Quote from Arantor on September 28th, 2010, 10:17 AM
Sure did, and no-one ever called me out on it, either and the original mod was written back in December 2009...
That's probably because we don't take code for granted, even our own.
Quote
You can't use it to insert only parts of posts unless you modified it here...
Ah yes, I had already merged it of course. Was faster to quote manually.
Quote
:edit: Actually, I *did* take care of the permission checking for searching. Basically, the unset items are all to do with removing it from the list of things it knows about for searching/displaying within the manage area.
Err, from what you're saying, your fix was already in your mod, then?
You've lost me here...
In my previous post, I mentioned how I'd found the fix in ManageMembers.php, with the unset().
Quote
! Ensure view-IP permissions are applied during install (install_2-0.sql)
So, in the end you're leaving the perms in, instead of using the ban perms?
Quote
& Rephrase view-IP permission name and user help (ManagePermissions.english.php, Help.english.php)
It still implies that can_view_ip_own doesn't exist, and that no one but the admin can have can_view_ip_any...
I guess it's a WIP for now :)
10234
Features / Re: New revs
« on September 28th, 2010, 09:54 AM »
Quote from Arantor on September 28th, 2010, 09:50 AM
Quote
Yeah that's a bit complicated... You should make it more generic. "Visible only to those who have permission to do so", or something like that...
Works for me.
Then I'll let you rephrase it :P
I'm just not comfortable enough with the English (NOT Scottish!) language.
Quote
Yup. This is why I just left it... but after sleeping on it, the easiest way to fix it is to align it with the ban list permission; those who have access to the ban list can see any IP, those who don't, can see their own - oh, and it probably should be barred from being given to guests.
Well... That's a good idea. I'd go with it.
Quote
It could be moved to the modlog lang file?
Or that, yes. :)
Quote
[quoet]
Pwned! Didn't use insertQuoteFast :P
Quote
Yes it is. Something I didn't remember in the original mod...
You mean the original mod had the hole? ;)
(Ah yes, I just checked, the fix is in it, indeed. Good thing we're both checking the code, always a failsafe for when we're lazy :))

I should stop posting so many smileys...
10235
Features / Re: New revs
« on September 28th, 2010, 09:50 AM »
rev 165
- Removed a YaBBSE leftover. (upgrade.php)
! New IP text was missing LI tags. (Display.template.php)
! Fixed quick moderation checkboxes logic. (Search.template.php, Recent.template.php)

Done with the proof-reading :)
10236
Features / Re: New revs
« on September 28th, 2010, 09:48 AM »
Quote from Arantor on September 28th, 2010, 09:41 AM
Quote
$helptxt['see_member_ip'] should be updated (or deleted) to reflect the changes... Don't you think?
Probably, yes, but I didn't know how to word it, short of having it look up the groups.
Yeah that's a bit complicated... You should make it more generic. "Visible only to those who have permission to do so", or something like that...
Quote
Yeah, I took the code directly from my old mod on the subject, and I'm not one for writing nice meaningful permission names...
Lazy ass :P
Still -- valid request but it could probably be done site-wide when we implement non-forum code later...
Quote
No, it isn't. I wasn't sure where to pitch the defaults (since logically, restrict probably needs view-ip-any), so left them all out (not just from the installer, but the default levels that are specified in ManagePermissions)
Dunno what's best.

$txt['logged'] is no longer used in the Display template -- only in Modlog. Maybe it should be removed...?
Posted: September 28th, 2010, 09:45 AM

Searching for members by IP: it's disabled if you don't have the perms... But is it disabled in the actual search? I can edit a page and deleted "disabled" with Opera, in real time by editing the source (or in any modern browser by using a debugger tool), then if it's not disabled in the php file it's a security hole... I guess :)
10237
Features / Re: New revs
« on September 28th, 2010, 09:38 AM »
rev 164
* Replaced apache_request_headers() emulation code with a shorter, faster version. (QueryString.php)
! Fixed validation error. (Search.template.php)

(The validation error is also in SMF2, AFAIK. Also, my fix is technically all right, but logically wrong. I'll rewrite it in the next commit, sorry.)
Posted: September 28th, 2010, 09:15 AM

BTW, nice catch on ManageMembers... Fixing the 'cols' into 'columns'. Another SMF2 stock bug...!
Posted: September 28th, 2010, 09:29 AM

$helptxt['see_member_ip'] should be updated (or deleted) to reflect the changes... Don't you think?
Posted: September 28th, 2010, 09:36 AM

$txt['permissionname_view_ip_address'] = 'View IP addresses in the main forum';
(And a couple other occurrences)

'Main forum' and 'forum' disturb me a bit, because profiles are not part of a 'main forum' per se, and we'll be adding support for blogs, which are definitely not forums.
Maybe 'front-end', 'outside the admin area' or something like that..?
Posted: September 28th, 2010, 09:38 AM

Is the view own IP permission set by default? I don't think it is?
10238
Features / Re: New revs
« on September 27th, 2010, 10:52 PM »
Phew......!!! I really felt bad about that déjà-vu! :lol:
Quote
It seems to be incomplete however with IE 8 behaving incorrectly under some circumstances (yay?)
IE8 is bitchy with the post editor. Recently Ante committed a fix suggested by whomever I don't remember, which basically replaced the min-width;max-width with a normal width, and added a very high number of cols to the textarea (a hack to make it work.)
Quote
Yeah... mostly it is, I just looked over Themes.php to see what fun there would be to document it, and found those functions. Since they didn't have upper case first letters, they wouldn't be called as action handlers... so went looking ;)
I like it when you do these things.

...

No, it's nothing sexual. For crying out loud.
10239
Features / Re: New revs
« on September 27th, 2010, 10:36 PM »
Quote from Arantor on September 27th, 2010, 10:16 PM
+ If the character before a smiley is a space, don't add another space (tested on IE8, Chrome 6) (editor.js)
I have a feeling of déjà-vu... Is it normal? I wanted to do this at some point... Did I suggest it? Did you? Or did someone on the SMF bug tracker, maybe? Nah, I don't think so, I remember once thinking about this while not in front of my PC... Was dying to try implementing that, but forgot afterwards...
Quote
! Removal of more legacy stuff (template upgrading from YaBBSE/SMF1 templates) (upgrade.php, Themes.php)
Yay! I thought we hardly had anything left to strip at that point...... ;)
10240
Off-topic / iHate Apple
« on September 27th, 2010, 12:08 PM »
Sorry, I noticed Dismal's link so I couldn't help asking this here!

Ever since I saw the Epic Citadel demo for the iPhone4 and iPad, I've become a despicable Apple fanboy in the closet. (Yes, this is the closet here.) Don't get me wrong -- I still hate Apple, but I really, really like top tech 3D shite in small devices. I bought a DS at some point, but the 3D wasn't so good, and it's hardly hackable. Now, I got to manipulate several friends' iPhones over the years, and I loved the iPhone 4 because of the resolution, but hated the iPhone4 case, because it's rugged. I mean, its corners are edgy, rather than soft like on the iPhone 3 case.

Now, I'm considering buying an iPod Touch 4 because it's cheap (309¤ with 32GB), has high res, and seems to have the same case as earlier generations.
I don't know if it's the 'right' choice. Would 8GB be enough? Same hardware as the 32GB version or not?
I couldn't care less about a good camera, and I like my current phone (a very old cheap one, eh.)

I'd go for the iPhone4 if I had an actual reason to use the Interwebs outside of my place... But I really don't go outside a lot, and I think it's way too expensive for the use I'd make out of it -- I mean... I call people for something like, 15 minutes a month at the most?

Probably just posting this topic will give me some relief... I'm a sucker for gadgets. I've managed not to buy anything too 'gadgety' in the last couple of years. But right now, with Epic Citadel, it's become VERY hard. :P
10241
Features / Re: New revs
« on September 27th, 2010, 11:32 AM »
rev 159
- Deleted some theme compatibility leftovers. Again: Wedge is not compatible with SMF 1.x themes. Use SMF 2.x if you need compatibility. (detailed-version.js, Load.php, Compat.template.php)
- Deleted $settings['separate_sticky_lock'] from index template, as the feature was deleted from Wedge and if it's not supported in the default theme, external themes should deal with it by themselves. (index.template.php)
- Deleted $settings['doctype'], which isn't used in Curve. I don't think it should cause any incompatibilities with future HTML5 themes... (Or use XHTML5, heck.) (index.template.php)
- Deleted leftovers from older themes in language files. (index.english.php)
* Various subtle CSS improvements. (index.css, MessageIndex.template.php, Recent.template.php)
* Spacinazi. (ManageErrors.php, Subs.php, MessageIndex.template.php, Recent.template.php)

(May require a bit of double-checking... I *hope* my logic for separate_sticky_lock is good, because otherwise it means I don't have a damn idea of how themes are supposed to work :P
10242
Features / Re: New revs
« on September 27th, 2010, 09:48 AM »
rev 158
- Deleted remaining hotTopic vars from install script. (install_2-0.sql)
! Fixed padding issues in main menu. (index.css, ie6.css)

Not much, but I'm quite happy with the main menu now. ;)
10243
Features / Re: New revs
« on September 26th, 2010, 08:27 PM »
As always, my revs aren't nearly as exciting as Pete's ;) But they must be done, too. And I'm here to do them, whether it rains or snows.

rev 154
+ Introduced #navi to contain the main menu and linktree areas and avoid breaking the menu under IE6 (don't ask.) (index.css, ie6.css, index.template.php)
- Deleted grad350.png, replacing header background with grad250.png because it's been reduced in height anyway. Doesn't look as good when folding it, but the header fold feature will probably be removed in the future anyway.
* Harmonized div.frame paddings, as they're confusing in their current state, and the trick was only useful in a vanilla Curve. (index.css)
! ie8.css was still being called by error. (index.template.php)
* Put linktree items on the same line as their LI parents, just like menu items. (index.template.php)
* Spacinazi. (QueryString.php, Subs.php)
* Saving a few bytes off JS files. (pngfix.js, css3.htc)
10244
Features / Re: New revs
« on September 25th, 2010, 09:36 PM »
rev 146
* Put submenu entries on the same line as their LI containers, to make menus a little bit less overwhelming when viewing the HTML source. (GenericMenu.template.php, index.template.php)
+ Added index.php protection to xkcd avatar folder.
* Updated to SMF rev 10141.
  * Minor typos and glitches
  ! The check on package server URL for http:// prefix failed.
  ! Incorrect parameter given for checkImageContents() on avatar uploads.
  ! Members with moderate_forum permission can no longer access Manage Posts admin area.
  * All new replies added via JavaScript were marked as ignored.
  * Fixed secret question page, and overflow error in admin menus.
  ! Tables should be created with SMF's charset and collation
  ! Installing as UTF8 should make all tables UTF8 <-- that's Pete's fix :)
10245
Features / Re: New revs
« on September 25th, 2010, 08:44 PM »
Nope... That's why I said it was a miracle.