ElkArte Community

Elk Development => Feature Discussion => Topic started by: Antechinus on June 30, 2013, 04:46:28 am

Title: Old SMF stuffz............
Post by: Antechinus on June 30, 2013, 04:46:28 am
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
Title: Re: Old SMF stuffz............
Post by: emanuele on June 30, 2013, 05:23:26 am
/me 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.

/me runs
Title: Re: Old SMF stuffz............
Post by: Antechinus on June 30, 2013, 05:28:24 am
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.
Title: Re: Old SMF stuffz............
Post by: emanuele on June 30, 2013, 05:36:02 am
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:-)
Title: Re: Old SMF stuffz............
Post by: Antechinus on June 30, 2013, 05:58:47 am
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.
Title: Re: Old SMF stuffz............
Post by: emanuele on June 30, 2013, 06:09:45 am
Something like that:
https://github.com/emanuele45/Dialogo/commit/caa63877c3a24dda32e4205d2e944652cc87f132

Darn, "reply" is still broken... (no subject)
Title: Re: Old SMF stuffz............
Post by: Antechinus on June 30, 2013, 06:32:38 am
Yeah looks basically ok, at a glance and without thinking too much. :D
Title: Re: Old SMF stuffz............
Post by: Antechinus on June 30, 2013, 07:25:35 am
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.
Title: Re: Old SMF stuffz............
Post by: emanuele on June 30, 2013, 07:43:53 am
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. ;)
Title: Re: Old SMF stuffz............
Post by: Antechinus on June 30, 2013, 07:49:53 am
Ok cool. Will do. :)
Title: Re: Old SMF stuffz............
Post by: Antechinus on July 04, 2013, 03:44:15 am
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. :)
Title: Re: Old SMF stuffz............
Post by: IchBin on July 04, 2013, 01:46:28 pm
Agreed. No point in showing all the fluff IMO.
Title: Re: Old SMF stuffz............
Post by: Antechinus on July 04, 2013, 07:42:15 pm
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.
Title: Re: Old SMF stuffz............
Post by: emanuele on December 08, 2013, 04:25:18 am
I don't remember if this is still that way or something changed.
To check.