vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Miscellaneous Hacks - Unread Posts and Reputation Comments (welcome box) (https://vborg.vbsupport.ru/showthread.php?t=123886)

Paul M 08-16-2006 03:47 AM

Quote:

Originally Posted by Redlinemotorsports
And it didn't work :(

You needed to read on a bit to post 33.

Quote:

Originally Posted by Paul M
This won't work, the template cache is not the same as the template itself - it is actually php code, you cannot search for vb template specific stuff like <if> and <phrase>.


GrendelKhan{TSU 08-28-2006 01:41 PM

anyway to EXCLUDE certain threads or forums from the count?

eg: I don't RSS feeds showing up on this as it turns out to be new thread/information overload and drowns out 'legitimate' new posts.

Paul M 08-28-2006 07:33 PM

Nope, there is no such facility.

SCRIPT3R 09-11-2006 08:21 PM

possible to have flexible phrases depending on number of new posts/updated threads (similar to this hack)?

Number of Unread Posts: 0
Number of Unread Posts: 1
Number of Unread Posts: 2 (In One Thread)
Number of Unread Posts: 3 (In Two Threads)

Paul M 09-11-2006 10:37 PM

Sorry, there are no plans to add anything to this, as it's not something I use myself.

cjwinternet 09-16-2006 09:44 PM

installed and working OK, but it doesn't look as good as the 3.5 version.

R1lover 09-17-2006 03:31 AM

Nice Hack........ Thanks

DPSR 09-17-2006 01:33 PM

Thanks buddy, i will install it on my vb3.6.1 :D:D

BUT

I want to add the line 'Number of unread posts:' somewhere else...is this possible??

Paul M 09-17-2006 01:57 PM

Only by modifying the plugin.

DPSR 09-17-2006 03:49 PM

can you please guide me a little bit?

markblair 09-18-2006 02:59 AM

I installed the modification just as it was listed here but it isn't working. I have Database (automatic forum marking) enabled and I chose 'No' for the Display Unread Posts Option so it would show all posts. However, nothing changed when viewing the main page of my forum. Any help is greatly appreciated as this sounds like a nice hack to add. :) Thanks!

Paul M 09-18-2006 12:33 PM

You have a custom style, which means the code this looks for in the template may not be there.

markblair 09-19-2006 03:20 AM

Quote:

Originally Posted by Paul M
You have a custom style, which means the code this looks for in the template may not be there.

Yeah, I was thinking that might be the problem. I added the $unread code to the navbar template and it showed the information but of course it wasn't in the right spot. Is there anywhere I can manually add that code to to get this to work? I was trying to add that code somewhere into the following section of the navbar template:
Code:

<!-- Aria Container -->
<!-- breadcrumb, login, pm info -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center" id="collapseobj_navbar" style="$vbcollapse[collapseobj_navbar]">
<tr>
<td class="alt1" width="<if condition="in_array(THIS_SCRIPT, array(index))"><if condition="$show['member']">57<else />100%</if><else />100%</if>">

<if condition="in_array(THIS_SCRIPT, array(index))">
<if condition="$show['member']">
<!-- Aria Forumhome Panel -->


Paul M 09-19-2006 11:11 AM

There is not enough there to go on.

In the standard navbar, there is this section of code ;

Code:

        <if condition="$show['member']">
       
                <td class="alt2" valign="top" nowrap="nowrap">
                <div class="smallfont">
                        <strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong><br />
                        <phrase 1="$pmbox[lastvisitdate]" 2="$pmbox[lastvisittime]">$vbphrase[last_visited_x_at_y]</phrase>
                        <if condition="$show['pmstats']"><br /><phrase 1="$vbphrase[unread_x_nav_compiled]" 2="$vbphrase[total_x_nav_compiled]" 3="$session[sessionurl_q]">$vbphrase[private_messages_nav]</phrase></if>
                </div>
                </td>

This looks for the highlighted bit and inserts the unread display after it.

markblair 09-20-2006 04:57 AM

I think I got it. I looked for the last part of that code
Code:

$vbphrase[private_messages_nav]</phrase></if>
and just added the $unread command after that. The only issue now is that the link the unread line goes to is wrong. It is pointing to the following which displays a "Page cannot be displayed" error due to the incorrect \ marks in the URL.

http://www.userintervention.com/\"search.php?do=getnew\"

Paul M 09-20-2006 05:16 AM

$unread is not designed to go direct in the template, you will need to edit the plugin to remove the backslashes.

markblair 09-20-2006 05:25 AM

Hey, thanks for the information. I did as you suggested and it is now working. Thanks again!

Masiello 09-20-2006 06:46 AM

Click "INSTALL"
Thank you.

P.S. Works great on vB 3.6.1

Just a question, how do I take the same look like "Messaggi non letti" without the 0 Underline like the snapshoot?

Paul M 09-20-2006 07:18 AM

You can't (without rewriting it slightly).

Masiello 09-21-2006 05:03 AM

Quote:

Originally Posted by Paul M
You can't (without rewriting it slightly).

Ok :( Thx

ForumDog 09-21-2006 02:45 PM

Is there a reason that the hyperlink used in the mod's new posts link doesn't include the sessionurl add like the default link for new posts search does?

Paul M 09-21-2006 04:10 PM

Because I never added it, and in two years, no one has ever complained. :)

I've never actually come across anyone who doesn't use cookies.

ForumDog 09-21-2006 04:20 PM

Nope, me neither. Can't do any harm in a particularly non-essential way though. :)

Paul M 09-21-2006 04:33 PM

Well i've added it to the todo list, so it will get done at some point in the future.

Paul M 09-23-2006 07:54 AM

In fact, phrases altered to make them more flexible, also changed them to be more like previous versions.

Smoothie 09-23-2006 10:24 PM

Quote:

Originally Posted by Paul M
In fact, phrases altered to make them more flexible, also changed them to be more like previous versions.

what exactly is different in this version than the previous one?

Paul M 09-23-2006 10:38 PM

The displayed messages.

Masiello 09-24-2006 06:26 AM

Thanks Paul

Hey Paul, I've translated the phrase like that:

Quote:

<strong>{1} <a href="search.php?do=getnew">Messaggi da leggere{2}</a></strong> dalla tua ultima visita.
But the message show with the "s" at the end of the "leggere" it show "leggeres", how to fix?

I believe the issue is inside this code:

Quote:

$plural = 's';
if ($postcount['unread'] == 1) $plural = '';

if ($vbulletin->options['unreadlv'])
{
$unread = addslashes(construct_phrase($vbphrase['unread_posts_visit'],$postcount['unread'],$plural)).'<br />';
}
else
{
$unread = addslashes(construct_phrase($vbphrase['unread_posts'],$postcount['unread'],$plural)).'<br />';
}
How to fix it with the word "Messaggi" if is plural, if not is "Messaggio"

Below is the snapshot

ForumDog 09-24-2006 08:55 AM

For some reason this mod doesn't show the unread count for me on SHOWTHREAD - and only that template as far as I can tell - running 3.6.1.

I tried disabling all other plugins, changing the execution order, minutely examining my templates, could find no obvious cause or make any difference. It's a heavily customised forum so I can't really say for sure it's not something I've done that's breaking it but the reason I mention it as an FYI is because the 3.5 version of this plugin does not have the same issue, works perfectly.

Paul M 09-24-2006 10:48 AM

Quote:

Originally Posted by Masiello
How to fix it with the word "Messaggi" if is plural, if not is "Messaggio"

Below is the snapshot

Hmm, that bit wasn't really designed with translations in mind, but I think you could do it by changing

Code:

$plural = 's';
if ($postcount['unread'] == 1) $plural = '';

to
Code:

$plural = '';
if ($postcount['unread'] == 1) $plural = 'o';

and putting Messaggi{2} in the template.

Paul M 09-24-2006 10:53 AM

Quote:

Originally Posted by ForumDog
For some reason this mod doesn't show the unread count for me on SHOWTHREAD - and only that template as far as I can tell - running 3.6.1.

I tried disabling all other plugins, changing the execution order, minutely examining my templates, could find no obvious cause or make any difference. It's a heavily customised forum so I can't really say for sure it's not something I've done that's breaking it but the reason I mention it as an FYI is because the 3.5 version of this plugin does not have the same issue, works perfectly.

Pass on that.

It uses the navbar template for display, there is no connection with showthread I can think of. There is also very little difference between the core of this and the 3.5 version.

Masiello 09-25-2006 02:00 PM

Thanks Paul ;) Now I'll try, but I'm sure it works fine how you say ;)

ymy 09-25-2006 09:10 PM

Click "INSTALL" :rolleyes:

Works great on vB 3.6.0

Thank you.

Phooey 09-27-2006 02:43 AM

I'd love to have this hack display elsewhere on my forum (in a different template) and read "New Posts: XX".

Can someone help me edit this to do that? My site is www.digitallywise.com and ideally, I'd like it on the left side in the 'Navigation' box.

Thanks!

brvheart 09-27-2006 05:11 PM

could you add unread threads to this as well?

Paul M 09-27-2006 08:01 PM

Sorry, that's not likely at the moment, if at all.

brvheart 09-27-2006 09:09 PM

ok thanks :)

Masiello 10-04-2006 07:14 PM

Can this works fine with vB 3.6.2?

Paul M 10-04-2006 09:14 PM

Yes.

emtee 10-05-2006 07:37 AM

Does this hack use 1 query?


All times are GMT. The time now is 05:31 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01571 seconds
  • Memory Usage 1,819KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete