News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

"unread" and "replies" tabs for main menu

Started by Jade Elizabeth, November 06, 2008, 12:34:59 PM

Previous topic - Next topic

Jade Elizabeth

Well my issue is the way SMF is, and the way the package manager is.


It parses correctly... have you got any mods installed by any chance? Anything that edits things around the place where the greeting is?
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Gryzor

Hmmmm... I do have a couple of mods, but none that I can remember of that meddles with stuff in there. I'm attaching my /themes/default/index.template.php for you to look into, if you want. Going through it manually I can't see the stuff your mod tries to replace...

Ah, basically in my file I see:


// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
if (!empty($context['user']['avatar']))
echo '
<p class="avatar">', $context['user']['avatar']['image'], '</p>';
echo '
<ul class="reset">
<li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span></li>
<li><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></li>
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>';


So, if I ignore the errors it cr@ps out, continue with installation and then delete the lines you mention, it should work?

Jade Elizabeth

Yeah, just don't forget the '; on the end of the last line there, it should move up to where the greeting line is :).
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Black Viper

Same as above error that the greeting line is not correct. SMF 2.0RC3. My greeting line is:
<li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span></li>

The default line of index.template.php curve (english, full version) is as above downloaded from SMF and viewed directly from the zip file with no
.
This could be why the package manager fails install as it is looking for this line:
<li class="greeting">', $context['greeting'], '</span></li>
Which does not exist...

Gryzor

Are we absolutely sure that it works with an untouched 2.0RC3? Just asking - maybe we're banging our heads against the wrong wall here :D

Anyhow, I'll try a manual install tonight hopefully...

Black Viper

Quote from: Gryzor on March 26, 2010, 04:34:27 AM
Are we absolutely sure that it works with an untouched 2.0RC3? Just asking - maybe we're banging our heads against the wrong wall here :D

Anyhow, I'll try a manual install tonight hopefully...
I am not questioning the mods actual functionality, just the install routine.
The line is as stated above on an SMF 2.0 RC3 install as well as verified by me in the full install .zip file looking at it in that archive. This can be done just by viewing the file in that .zip file without installing anything.
It should be noted that this is non-UTF-8 if that makes a difference.

Jade Elizabeth

I must have been looking at the wrong thing, sorry guys! I'll fix it up in the morning, I don't want to explode everything tonight 8-). I'm too tired lol.

Thanks for pointing it out though, I appreciate it :D.
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Gryzor

@Viper: oh, me neither, that's what I meant, too! Obviously it does work somehow!

@Jade: have a good night's rest then, a shame we're in different time zones as I reeeeally want to get this working... I'll post here if I have any luck with manual installation!

Black Viper

Quote from: Jade Elizabeth on March 26, 2010, 05:30:57 AM
I must have been looking at the wrong thing, sorry guys! I'll fix it up in the morning, I don't want to explode everything tonight 8-). I'm too tired lol.
Line number 187 is where I am looking.

Jade Elizabeth

Should be fixed now guys! I think I might have been looking at one of the other SMF packages I have back here.
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Gryzor

#130
Hmmm... I still get the same error. Can't replace:

<li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span></li>
<li><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></li>
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>


with
<li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span></li>


:( :( :(


Tried to do it manually, the forum gets broken:
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in .../Themes/default/index.template.php on line 208
199: if (!empty($context['user']['avatar']))
200: echo '
201: <p class="avatar">', $context['user']['avatar']['image'], '</p>';
202: echo '
203: <ul class="reset">
204: <li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span></li>;
205:
206:
207: // Is the forum in maintenance mode?
208: if ($context['in_maintenance'] && $context['user']['is_admin'])
209: echo '
210: <li class="notice">', $txt['maintain_mode_on'], '</li>';
211:
212: // Are there any members waiting for approval?


Yet my file reads:


// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
if (!empty($context['user']['avatar']))
echo '
<p class="avatar">', $context['user']['avatar']['image'], '</p>';
echo '
<ul class="reset">
<li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span></li>;

// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
<li class="notice">', $txt['maintain_mode_on'], '</li>';



so, you can see that the ';' is there... argh!

Nonetheless, I went ahead with the installation and now I have an "Unread posts" on the title bar of each main forum's title. Was that there before? :D

Jade Elizabeth

On 204, try adding a ' before the ;... I'll fix it again, sorry :-[.

Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Gryzor

Quote from: Jade Elizabeth on March 27, 2010, 05:34:29 AM
On 204, try adding a ' before the ;... I'll fix it again, sorry :-[.

...d'oh!!! Even I knew how to fix that, I guess I was way too sleepy (up since 620am) to notice that... thanks, it now seems to work perfectly, albeit through manual installation.

Cheers!
T

Jade Elizabeth

LOL Ha! See, I'm not the only one XD.

I dunno why that happened. I checked my package and it shouldnt even touch the '; on the end....so I think it's your theme :(.

On a default install you have this:

// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
if (!empty($context['user']['avatar']))
echo '
<p class="avatar">', $context['user']['avatar']['image'], '</p>';
echo '
<ul class="reset">
<li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span></li>
<li><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></li>
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>';

// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
<li class="notice">', $txt['maintain_mode_on'], '</li>';



My mod changes it to this:
// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
if (!empty($context['user']['avatar']))
echo '
<p class="avatar">', $context['user']['avatar']['image'], '</p>';
echo '
<ul class="reset">
<li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span></li>';

// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
<li class="notice">', $txt['maintain_mode_on'], '</li>';
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Gryzor

Heheh.... is the mod itself working now? I mean, is it updated so I can test it?

...but then again it will fail, even if updated, since I did the changes by hand... oh well, next SMF upgrade!

Jade Elizabeth

All my mod did was add buttons to the menu that were existing links in SMF (but not commonly found).

The other version does that and removes the visible links in the header to them because some people find that messy lol.
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Siwrx

HI guys (and girls)

Since I've changed my forum to the theme "greenblacky", the "show unread post" tab as disapeared, I've tried to install this package and the set up should be fine but nothing change, is everything fixed ? should I do some mod more manually ?

thanks !

Jade Elizabeth

Try hitting the parse option and editing the files for themedir/default with the ones for your theme :).

Also, don't forget to clear cache :).
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

lowburb

#138
HI. When I try to uninstall this MOD, the forum default "#Show unread posts since last visit" and "#Show new replies to your posts" shows up twice. See attachment.

Jade Elizabeth

Did you upload the wrong version to uninstall?
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Advertisement: