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 - Dragooon
301
Features / Re: Template edits
« on January 18th, 2013, 07:27 PM »
Oh classes should be added for contexts, they can provide good theming opportunities if nothing else.
302
Features / Re: Template edits
« on January 18th, 2013, 07:18 PM »
Quote from Arantor on January 18th, 2013, 07:09 PM
You can request it :P

On a more serious note, what did you have in mind? I've thought about adding CSS classes to the post container for things like topic starter, whether the person is an admin and so on.

I'm open to suggestions for other layout issues (and to me, this does seem more like a plugin candidate than a core feature)
It definitely is a plugin candidate, but it's not an easy plugin to create currently (although perhaps hooking into prepareDisplayContext and modifying member's entire link HTML can be done, not sure). I basically wanted an indicator (something like [OP] next to the poster's name) to notify that this person created the thread. In forums where discussions can go on for hundreds of pages, it becomes harder to track who actually started the thing. Classes isn't a bad idea either, but they're not entirely clear cut indicators for new members.
303
Features / Re: Template edits
« on January 18th, 2013, 07:07 PM »
True that.

While we're on topic, can I ask a core feature request to indicate whether the poster is the OP? :P...
304
Features / Re: Template edits
« on January 18th, 2013, 07:03 PM »
Quote from Arantor on January 18th, 2013, 07:00 PM
<we:cat> is down to the skin itself, as is <we:title> and <we:title2>. The skin defines what they are meaning that the skin can provide whatever markup it likes for them.

It would be possible to add more, sure - but what? Replacing the we:cat/title/title2 were the big ones.

As far as other templates it really depends on what - the main structure of plugins has been to allow plugins to add new subtemplates - they can replace entire subtemplates in the skeleton too.

Everything else we'll take on a case by case basis.
Yeah, I almost realised the mootness of my post as soon as I hit the submit button. It's just that there isn't (and pretty sure there really won't be since it's fundamentally a much harder thing to do than modifying source files) a good way to modify templates freely.
305
Features / Re: Template edits
« on January 18th, 2013, 06:53 PM »
It isn't just the post template I'm curious about, just any template in general.

Can something like hook tags be added to the templates which are replaced by HTML added by hooks during the buffer rewriting, where you also process the <we:cat> etc[1]. Add a bit more pre-defined templates (similar to <we:cat> etc) and theming cannot be a complete mess.

EDIT: The above idea is potentially stupid for contextes where data processed in the template is required....

Second EDIT: This above idea is actually pretty stupid in almost all the cases, this is almost same as adding a call_hook to templates and that can actually pass data.
 1. Not entirely sure, but I believe it's done around buffer rewriting part of the process?
306
Features / Mini-skeletons
« on January 18th, 2013, 03:24 PM »
Probably an old topic, but if I want my plugin to edit a template how would I go about it? Say, I want to make a plugin to indicate whether the poster of the post is the OP of the topic or not, I'd need to modify a specific area of Display.template but I'm not sure how to do that without modifying the template itself[1]. Any ideas or is that not possible yet?

:edit: Modified topic subject -- Nao.
 1. I haven't really dug deep into this, just had a quick glance and was wondering
307
The Pub / Re: Translation
« on January 18th, 2013, 02:19 PM »
Quote from Hristo on January 18th, 2013, 09:01 AM
Quote from Arantor on January 18th, 2013, 04:28 AM
Quote
That's awesome. But you need to figure out a way where translator can insert their special carahteres without the utf-8 code.
For example, I want to write "dog" in portuguese. I want to write "Cão" and not "C&#227";o. Do you understand what I mean? For me it's not a problem at all. I'm thinking in other that don't know the utf-8 "alphabet".
I do understand what you mean, and I'm sure we'll figure something out. I don't know what yet, but there's time before we get there.
Excuse my ignorance, I'm new in this and maybe that is why I fail to see the problem here. I'm using the Cyrillic alphabet and my SMF forum is set as utf-8. I often translate mods and untranslated/mistranslated strings in the language pack. Bulgarian has not that many special characters and they are used rarely, but still I have never used the codes instead of direct inputs. I checked the Portuguese SMF lang pack and all the special Latin characters are input directly. Why Wedge would have a problem with that?!

..... or you are talking about the cases where the user's keyboard has no preset special characters?!

Or I'm so ignorant that I even can't understand what are you talking about :)...
I'm fairly sure he meant when the user doesn't know how to actually type the special character (via keyboard or through Alt codes) and would, instead, generally type the character code.
308
Archived fixes / Typo in Class-DBPackages.php
« on January 17th, 2013, 07:16 PM »
Class-DBPackages.php

Code: (Line 39) [Select]
return in_array(str_to_lower($table), $reserved);
309
Features / Re: Improving how smileys are managed
« on January 16th, 2013, 07:21 PM »
Quote from Arantor on January 16th, 2013, 06:15 PM
I'm still not making myself clear, I can see this.

Smileys are ALREADY loaded into the main CSS file, automatically. It's been that way for months. Seriously, check the code for any smiley on the site thus far. ;)

Code: [Select]
<i class="smiley wink_png">;)</i>

But it relies on having physical files coming into the system to read, encode and store in the CSS. I'm proposing changing *this* part of the process and only this part of the process, to be able to streamline smileys being added, ideally without having to have write access anywhere that is currently needing write access.
Posted: January 16th, 2013, 06:11 PM

Though it just occurred to me that it might cause IE to poop itself as it doesn't like overly long data URLs.
No, that's not what I meant. I realised that this is already implemented in Wedge, but what I was asking was what happens when there are a lot of smileys? A lot of forums have huge smiley packs and many of them are animated, that makes for a few MBs of smileys in a CSS file which will be loaded at once, it'll probably cross a few browser's cache limits as well (especially on mobile, iOS doesn't even cache permanently and ANdroid can have a few MBs of cache depending upon the device but it can still be an ugly ride).
Posted: January 16th, 2013, 07:16 PM

Okay, reading the source it seems it won't embed smileys beyond 4KB, that'll probably help quite a bit. But perhaps it should limit the CSS file beyond a limit?
310
Features / Re: Improving how smileys are managed
« on January 16th, 2013, 06:08 PM »
Quote from Arantor on January 16th, 2013, 06:05 PM
Um, yes, yes it can. I mean it works currently, right? Yup, they're embedded as data URLs directly into the CSS file already ;)

The difference I'm proposing is to effectively change where this information is coming from - instead of getting them from the physical files as it does currently, get them from a database table.
Oh yes, sorry, didn't realise that. I understood the difference, it should drastically reduce the number of GET requests when compared to SMF that are performed on a page, but it can make the initial load heavy for the smiley CSS file if there are a crapload of smileys on a site (which is like 50% of sites out there).

EDIT: I know I'm arguing against an implemented feature, just wanted to share what I felt. Although in either case loading from DB seems like a better idea.
311
Features / Re: Improving how smileys are managed
« on January 16th, 2013, 05:56 PM »
Quote from Arantor on January 16th, 2013, 05:24 PM
Bump for Nao: what are your thoughts about storing the smileys in the DB and having them inserted in to the CSS from there? (I'm trying to avoid the need to push files to the file system unless necessary)
Can CSS handle animated gifs?
312
Features / Re: Ordering sticky topics
« on January 16th, 2013, 05:14 PM »
Yes! There are a few topics that I'd always like at the top (I have a bunch of stickies).
313
Plugins / Re: Future Dated Posts
« on January 15th, 2013, 02:27 PM »
This is sweet :D. What does it require post fields for?
314
Plugins / [Plugin] Re: Notifications system (1.0)
« on January 14th, 2013, 11:51 AM »
Quote from Arantor on January 13th, 2013, 03:52 PM
I think it's kind of hard to judge this without actually trying to make something myself with it.

Mind you, I've been of the opinion that we might need to add something along these lines into the core sometime.
Fair enough, hopefully you'll be able to make something yourself soon.
Quote from Pandos on January 14th, 2013, 10:43 AM
Love this idea!
In my case we're using an external CMS. Layout works over SSI. So the comments and replys to an article made in the cms will be recognized . Very cool!
Ofcourse, you'll need to code that part :)
315
Plugins / [Plugin] Re: Notifications system (1.0)
« on January 13th, 2013, 01:55 PM »
Just wanted to give this topic a bump, I'm still working on it (whenever I can, hardly getting time these days due to exams, then SMF4Mobile and all).  I wanted some opinions on what you guys think about the core plugin and all.

Some terminology, so that people don't get confused later.
Notifier: This is the object that actually issues notifications. For example, TopicReply is a notifier that issues notifications whenever a replied is posted to a person's topic.
Notification: Pretty obvious, individual messages sent to people to tell what's going on
NotifSubscriber: I probably need a better name for this, short for Notification Subscriber, this is another object which handles individual types of subscription. For example, there can be a subscriber for Board which handles sending out subscription notifications for any new topic in a specific board.

Basically, currently the core of notifications is divided into two. First is handling the notifications themselves, it allows plugins to have notifier and issue notifications to user. It also handles disabling of specific notifiers, individual preferences (if any) etc. in a single profile page. The second part handles subscriptions, basically anything that the user isn't directly linked to but wants to get an update of (same as current Wedge subscriptions). Subscription part is build on top of the notification core and is optional, it obviously aims at replacing the current mess of a subscription Wedge (and, by extension, SMF) has with a simpler UI and more modularity. My aim is to make the subscription option themselves simpler, an user can subscribe to a specific topic and see his or her subscription info from their profile, and remove them if they want. The advance notifying stuff (stuff like e-mail once every week etc.) gets moved to the notifications core. This way, other notifier can also, by default, take advantage of having some nice e-mailing options.

Currently subscriptions are divided into two parts, so one needs to code these two in order to add a new subscriptions . First is their subscriber, and second is their notifier. Subscriber handles all the subscription part of the equation, i.e. validating of topic (for example) they're trying to subscribe to  and issuing subscription notifications themselves whenever required (like when a new topic is posted). Notifier handles the notifications of the subscription, i.e. what to actually say when a notification is issued, what to do when there are multiple unread notifications of the same type, and notifier specific preferences (this is valid to other types of notifier as well and not only subscriptions).

To give an elaborate example for a subscription, if someone needs to create a plugin where anyone is notified when a specific user is quoted in a post (probably a stupid idea, but it gets the point across). A member will subscribe to another member to receive the notifications. One will firstly code the notifier itself. The notifier will have a few functions, firstly to return what the text should say for a specific notification, the e-mail text etc. and what to do if there are multiple unread notifications of the same type (so that it can say "admin has been quoted in "Re: Test" and 4 other messages"). Then comes the subscriber, which will handle identifying the subscriber itself (for internal purposes) and validating the member when someone is trying to subscribe to them, i.e. whether the member is valid and can be subscribed too or not. The plugin then will hook to post_form (or whichever hook is called after a post has been created),  and check if a member has been quoted, and if there has been a member who's been quoted, it will issue all the subscription notifications. The issuing part is mostly simple, you just need to call a function, say which subscriber you are (memberquote in this case) and for which object are notifications being issued (the member who has been quoted in this case) and pass any arbitrary data (post subject, etc.) that can be useful when displaying notification. The internal function (part of the core plugin, already coded, no need to code anything more here) will handle actually sending out the notifications to whoever has subscribed to that specific member. The plugin will also hook to appropriate places to add the button/UI for providing a link to actually subscribe to the place (the subscription action is handled by the core, but the UI is provided by the plugin which is adding a subscriber since it can be at any number of places).

I already have a couple of examples for simple notifiers, see them in my GH repository.

This can be a fairly bit complex to explain without code examples, but any feedback is appreciated. Is it too complex to extend? Any ideas which can probably make it simpler? Any examples of other systems which already do this and work well? Thanks :)