Skip to main content
Topic: Old SMF stuffz............ (Read 7479 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Old SMF stuffz............

I've been re-analysing board index stuffz, and there's still this down in the info centre:

Code: [Select]
	// If they are logged in, but statistical information is off... show a personal message bar.
if ($context['user']['is_logged'] && !$settings['show_stats_index'])
{
echo '
<h3 class="subsection_header">
', $context['allow_pm'] ? '<a href="' . $scripturl . '?action=pm">' : '', '<img class="icon" src="', $settings['images_url'], '/message_sm.png" alt="" />', $txt['personal_message'], '', $context['allow_pm'] ? '</a>' : '', '
</h3>
<p class="inline">
', empty($context['user']['messages']) ? $txt['you_have_no_msg'] : ($context['user']['messages'] == 1 ? sprintf($txt['you_have_one_msg'], $scripturl . '?action=pm') : sprintf($txt['you_have_many_msgs'], $scripturl . '?action=pm', $context['user']['messages'])), '
</p>';
}

This one has always puzzled me. I've ever been able to understand why the display of a PM bar should be dependent on the forum stats not displaying. There just doesn't seem to be any real logic to it.

Two things that could happen. One is to make it a separate setting, independent of forum stats. If it's going to stay at all, a separate setting seems more sensible.

OTOH, I really can't see why anyone would need a PM bar down there anyway. There's already the main menu, which has an alert for PM's. Then there's the button under the avatar in every post, which wll also tell you when you have unread PM's, and how many there are. An extra pile of PM stuffz at the bottom of the board index seems pointless. My vote is to ditch it completely.

I can kill? :D
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: Old SMF stuffz............

Reply #1

 emanuele thinks the info center should be almost completely overhauled...or at least rewritten to be more flexible and allow to add stuff without having to edit everything as usual (yeah Ant you can yell at me :P)

Just thinking now, but I would like to see any "first level" (i.e. 1 tab indented) starting from here:
https://github.com/emanuele45/Dialogo/blob/master/themes/default/BoardIndex.template.php#L220
as a separate function (well, all would be a bit too much, but at least organized in logical blocks: template_ic_recent_posts, template_ic_events, template_ic_stats, template_ic_users) , added to something like $context['info_center_callbacks'] and called in a loop so that if someone wants to add a new block to the IC he can just add the callback function to the array. Sort of what happens with the layers.

 emanuele runs
Bugs creator.
Features destroyer.
Template killer.

Re: Old SMF stuffz............

Reply #2

Yeah sure, as long as it can be formatted in the template, and is not all hidden in sauces. :P

Sauces pulls data from the database. Templates generate the markup to present the data. So there. :P

Rewriting info centre markup and css is a piece of cake, so I don't mind if you want to add functionality. I still reckon we should kill the old PM bar though. It's not useful.
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: Old SMF stuffz............

Reply #3

TBH I don't use the IC so much, so I have no idea what's useful and what not... lol
And since I like kill things... O:-)
Bugs creator.
Features destroyer.
Template killer.

Re: Old SMF stuffz............

Reply #4

Who's online is useful sometimes. Birthdays (social stuffz) and events (obvious, when they happen) are good to have, IMO. Recent posts can be handy too. The latest member link can be good, either for welcoming newbies or for thumping obvious spammers.

Stats? People tend to look at them occasionally, but probably wouldn't miss them much.
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P


Re: Old SMF stuffz............

Reply #6

Yeah looks basically ok, at a glance and without thinking too much. :D
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: Old SMF stuffz............

Reply #7

Oh, by the way, there's something I've been meaning to mention re templates. As an example, take the way Messagendex.template.php has been split up. It used to be the markup for the child boards was up top, with the markup for the topics listing being further down. Now it's the other way around.

This is illogical and confusing, IMO, and does nothing to make the template more comprehensible or functional. In general, people find templates most comprehensible when the order of the markup in the template mirrors the order of the markup as echoed to the browser. If you guys really want to make theming easer for beginner to intermediate coders, taking templates apart into little pieces and shuffling them around is not, in my considered opinion, really the way to do it.

If there are sound coding reasons for splitting things into a separate function, that's fine, but consider how the functions are arranged. The assumption behind the new arrangement of the MessageIndex.template.php must have been that hey, it's a list of topics in that board and the child boards are incidental content that doesn't really count. That's not the case. The child boards index is an integral and valuable part of that template.
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: Old SMF stuffz............

Reply #8

Yep, when I sent the code as a "WIP" in order to have it available and be able to test it.

There is no real meaning in the current function order, in some cases I split the functions in the same place the were (i.e. by simply adding } function template_something() { in between), in other more complex cases I copy&pasted the blocks in different places.

My original idea was to have them in the same order as they are used (or at least are supposed to be used), but then I didn't came back on that because I found other priorities. If you are working on them, feel free to move things around as you please. ;)
Bugs creator.
Features destroyer.
Template killer.

Re: Old SMF stuffz............

Reply #9

Ok cool. Will do. :)
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: Old SMF stuffz............

Reply #10

BTW, I generally agree with the sentiments expressed in this thread: http://wedge.org/pub/feats/8200/more-useless-nonsense/

Speaking of useless nonsense..... I'm not sure we really need the full poster droppy/sigs/custom fields/dancing bananas/Mexican jumping beans/mooses in fishnet stockings/etc in the PM pages.

I think it's cool for the forum at large, but I'd prefer PM's to be stripped down to the basics. Just show the poster's av (if showing poster area) and basic stuff like primary membergroup/icons. I'd be stoked if sigs and all the other stuff could be dropped from PM's, while still allowing it all in the forum, and without creating yet another setting to chase around.

My 2c. :)
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: Old SMF stuffz............

Reply #11

Agreed. No point in showing all the fluff IMO.
Success is not the result of spontaneous combustion, you must set yourself on fire!

Re: Old SMF stuffz............

Reply #12

More fluff: the post count bars on the memberlist. I think we should drop those too, and just have the number. With the option to display custom fields on the memberlist, the table can easily get very crowded. We should strip out anything that's not really useful, IMO.
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: Old SMF stuffz............

Reply #13

I don't remember if this is still that way or something changed.
To check.
Bugs creator.
Features destroyer.
Template killer.