Welcome, Guest. Please Login or Register.
May 18, 2024, 05:41:35 PM
Home Help Search Log in Register
News: If you are still using YaBB SE, please consider upgrading to SMF as soon as possible.

YaBB SE Community  |  Development  |  Completed mods  |  [Done 1.5.2] SearchNew Mod v.09 « previous next »
Pages: [1] 2 3 ... 9 Reply Ignore Print
Author Topic: [Done 1.5.2] SearchNew Mod v.09  (Read 24251 times)
Forge
Noobie
*
Posts: 23


WWW
[Done 1.5.2] SearchNew Mod v.09
« on: April 10, 2002, 02:10:50 PM »
Reply with quote

I haven't been on here in a while, and I can't find any of my other posts about my mod, so here goes everything from scratch...

My SearchNew mod allows registered users to track and display new messages in a tree-like format.  Here is a sample output from my site:



The mod adds a "SearchNew" icon on the main toolbar.  The output will show any messages that the user hasn't seen.  Clicking on a link will open the topic in a new window and jump to the selected message.  As you can see from the image, the mod allows users to mark messages/topic/board as read right from the interface.  The idea here is that the user can read the first line to tell if they want to skip the thread or not.  The user can also mark the thread as "ignored."  This will cause any new messages posted in the next 7 days to not appear in this output.  If the user manually visits that thread, the ignored status will be reset.  Also at the end of 7 days any new messages posted will appear in the results again.



YABBPak
The YABBPak version is available on my site.  To setup this version, you should add my server.  Go to YABBPak Center, click "Download new Yabbpaks."  Add my server as:

Forge's Search New
http://www.flakshack.com/yabbse/Packages

There are 3 versions out there now, one for yabbse 1.3, one for yabbse 1.4, and one for yabbse 1.5.2.  Make sure you download the correct version for your board.  Once you have added it, click on "Browse" then click on "Download."  Now go back to YABBPak Center and click Browse YABBPaks.  Click "Apply Mod."

I have tested the Pak version on a new install of YABBSE 1.4 and it works fine.  If you have installed any other mods, you'll obviously want to run through the "test" before applying the changes.

I'll check this thread for the next day or two, but after a while, if you have any questions or problems, please feel free to email me @ [email protected].
« Last Edit: April 29, 2003, 02:20:56 AM by Forge » Logged
joker
Jr. Member
**
Posts: 85


Fanatiker sind zu allem fähig, sonst aber zu nix!

Re:[DONE] SearchNew Mod (v.06 Update)
« Reply #1 on: April 10, 2002, 02:17:53 PM »
Reply with quote

Hey Forge,

it works fine here, but there is a little problem when used with the today/yesterday mod. Check your mail.
Logged

MfG joker ;)
Daniel D.
Mod Team
YaBB God
*****
Posts: 2935


Re:[DONE] SearchNew Mod (v.06 Update)
« Reply #2 on: April 10, 2002, 02:32:31 PM »
Reply with quote

That's an awsome mod, but there are so many "Mark as read" buttons. For what ?
« Last Edit: October 24, 2002, 07:32:40 AM by Daniel D. » Logged

joker
Jr. Member
**
Posts: 85


Fanatiker sind zu allem fähig, sonst aber zu nix!

Re:[DONE] SearchNew Mod (v.06 Update)
« Reply #3 on: April 10, 2002, 02:36:54 PM »
Reply with quote

You can mark individual posts, threads, board sections  or all as read.
Logged

MfG joker ;)
Forge
Noobie
*
Posts: 23


WWW
Re:[DONE] SearchNew Mod (v.06 Update)
« Reply #4 on: April 10, 2002, 02:37:45 PM »
Reply with quote

QuoteIn the postings-list, there are %-signs befor the dates

like this: %01.%04.%2002

I think they appear because i am using the today mod
(inkluding 'today' and 'yesterday')

I guess that makes sense, since I wrote my own timeformat() function (called mytimeformat()) instead of calling it from Subs.php.  The reason I used my own is because the date/time format that is good for the rest of the board, takes up a little too much space in my tree-view.

I should point out though, that it does work fine though on a normal YABBSE 1.3.0 board without that mod (at least on my board).

Since I don't have that mod installed, can you maybe post your timeformat function with that mod's changes (I'm assuming that's where they put them).  Thanks.

« Last Edit: April 10, 2002, 02:41:16 PM by Forge » Logged
joker
Jr. Member
**
Posts: 85


Fanatiker sind zu allem fähig, sonst aber zu nix!

Re:[DONE] SearchNew Mod (v.06 Update)
« Reply #5 on: April 10, 2002, 03:17:23 PM »
Reply with quote

Here's the timeformat  with a bugfix from my Sub.php
//Fix by Omar Bazavilvazo
function lang_strftime($currtime) {
   global $locale, $days, $months, $days_short, $months_short, $username, $settings, $timeformatstring;

   if ($username == 'Guest' || $settings[17]=='')
      $str = stripslashes($timeformatstring);
   else
      $str = stripslashes($settings[17]);

   if (setlocale(LC_TIME, $locale)) {
      $str = ereg_replace('%a', ucwords(strftime('%a', $currtime)), $str);
      $str = ereg_replace('%A', ucwords(strftime('%A', $currtime)), $str);
      $str = ereg_replace('%b', ucwords(strftime('%b', $currtime)), $str);
      $str = ereg_replace('%B', ucwords(strftime('%B', $currtime)), $str);
   }
   else {
      $str = ereg_replace('%a', $days_short[(int)strftime('%w',$currtime)], $str);
      $str = ereg_replace('%A', $days[(int)strftime('%w',$currtime)], $str);
      $str = ereg_replace('%b', $months_short[(int)strftime('%m',$currtime)-1], $str);
      $str = ereg_replace('%B', $months[(int)strftime('%m',$currtime)-1], $str);
      $str = ereg_replace('%p', (int)strftime('%H',$currtime)<12?"am":"pm", $str);
   }

   return strftime($str, $currtime);
}

function timeformat ($logTime){
global $timeformatstring,$username,$settings,$timeoffset,$txt,$db_prefix,$locale;
if (!isset($GLOBALS['todayMod']))
{
// pre-load variable so we don't query too much
$req = mysql_query("SELECT value FROM {$db_prefix}settings WHERE variable='todayMod'");
list($GLOBALS['todayMod'])=mysql_fetch_row($req);
}
$time = isset($settings[18])?$settings[18]:0;
$time = ($timeoffset+$time)*3600;
$nowtime = $time+time();
$time += $logTime;
if ($GLOBALS['todayMod']=='1')
{
$t1 = getdate($time);
$t2 = getdate($nowtime);
$strtfmt = (($username == 'Guest' || $settings[17]=='')?$timeformatstring:$settings[17]);
if ($t1['yday']==$t2['yday'] && $t1['year']==$t2['year'])
return $txt['yse10'].date(substr_count($strtfmt, "%H") == 0?" h:i:sa":" H:i:s", $time); //Bugfix by Omar Bazavilvazo
if ($t1['yday']==($t2['yday']-1) && $t1['year']==$t2['year'])
return $txt['yse10b'].date(substr_count($strtfmt, "%H") == 0?" h:i:sa":" H:i:s", $time); //Bugfix by Omar Bazavilvazo
}
return lang_strftime ($time);
}
Logged

MfG joker ;)
Godai
Mod God :P
Sr. Member
****
Posts: 473


YaBB SE!!!!

ICQ - 70621553godai78@hotmail.com WWW
Re:[DONE] SearchNew Mod (v.06 Update)
« Reply #6 on: April 10, 2002, 10:14:31 PM »
Reply with quote

I loved the gold version and i like very much this new one forge :)
Logged

Emanuele 'Godai' Sparvoli
YaBB Italian Team
100% YaBB Lover
tazthedev
Full Member
***
Posts: 161


I'm a llama!

Re:[DONE] SearchNew Mod (v.06 Update)
« Reply #7 on: April 10, 2002, 10:43:36 PM »
Reply with quote

great mod !!!

maybe a little ... kinda bug...

when a user start a new thread and next, he's going to click on the button search|new .... he will see his own post (new thread) in the list (there's no replies at this moment).... its not a big problem... but it is for me ... ;)

Logged
Forge
Noobie
*
Posts: 23


WWW
Re:[DONE] SearchNew Mod (v.06 Update)
« Reply #8 on: April 11, 2002, 07:01:28 PM »
Reply with quote

Quote from: tazthedev on April 10, 2002, 10:43:36 PMwhen a user start a new thread and next, he's going to click on the button search|new .... he will see his own post (new thread) in the list (there's no replies at this moment).... its not a big problem... but it is for me ... ;)

As a work around, you could change the code on the Post.php form so that once the post is made, it redirects back to the post instead of to the Message index.  This way, the user visits the thread and it is marked as read as soon as they post it.  This is the way YABB Gold did it, and that's probably why you noticed the difference.

Not sure how to do this.  I initially suspected it would just involve uncommenting/commenting the following code in Post2() that says:
   //$yySetLocation = "$cgi;action=display;num=$thread;start=$start";
   $yySetLocation = "$cgi";
   redirectexit();

But that generates a wierd error:

2: Supplied argument is not a valid MySQL result resource
(d:\fu\yabbse\Sources\Display.php ln 57)

Maybe someone else can give a tip on this?
Logged
Forge
Noobie
*
Posts: 23


WWW
Re:[DONE] SearchNew Mod (v.06 Update)
« Reply #9 on: April 11, 2002, 07:04:10 PM »
Reply with quote

Quote from: Godai on April 10, 2002, 10:14:31 PMI loved the gold version and i like very much this new one forge :)

Any chance you guys will include it in a future version?  That would be great.
Logged
joker
Jr. Member
**
Posts: 85


Fanatiker sind zu allem fähig, sonst aber zu nix!

Re:[DONE] SearchNew Mod (v.06 Update)
« Reply #10 on: April 11, 2002, 10:27:48 PM »
Reply with quote

Quote   //$yySetLocation = "$cgi;action=display;num=$thread;start=$start";
   $yySetLocation = "$cgi";
   redirectexit();

I changed this to:
   $yySetLocation = "$cgi;board=$board;action=display;threadid=$thread";
//   $yySetLocation = "$cgi";
   redirectexit();

because my users prefer to review the thread.
it workes fine in V1.3.1. here.
« Last Edit: April 11, 2002, 10:30:00 PM by joker » Logged

MfG joker ;)
tazthedev
Full Member
***
Posts: 161


I'm a llama!

Re:[DONE] SearchNew Mod (v.06 Update)
« Reply #11 on: April 11, 2002, 11:10:24 PM »
Reply with quote

Thanks, will try this :)

Logged
tazthedev
Full Member
***
Posts: 161


I'm a llama!

Re:[DONE] SearchNew Mod (v.06 Update)
« Reply #12 on: April 11, 2002, 11:17:15 PM »
Reply with quote

Quote from: Forge on April 11, 2002, 07:01:28 PMNot sure how to do this.  I initially suspected it would just involve uncommenting/commenting the following code in Post2() that says:
   //$yySetLocation = "$cgi;action=display;num=$thread;start=$start";
   $yySetLocation = "$cgi";
   redirectexit();

But that generates a wierd error:

2: Supplied argument is not a valid MySQL result resource
(d:\fu\yabbse\Sources\Display.php ln 57)


errr... where is post2() ??? I searched in post.php even display.php and i cant find it ...
Logged
tazthedev
Full Member
***
Posts: 161


I'm a llama!

Re:[DONE] SearchNew Mod (v.06 Update)
« Reply #13 on: April 12, 2002, 12:08:08 AM »
Reply with quote

well... found it :D
Logged
tazthedev
Full Member
***
Posts: 161


I'm a llama!

Re:[DONE] SearchNew Mod (v.06 Update)
« Reply #14 on: April 12, 2002, 12:34:22 AM »
Reply with quote

well..... the new thread we are starting ... is allways listed if we click on "search|new"...

BUT... at least, we are redirected in the new thread... so... i gave you a note of 5/10 ;))) hehehe

Logged
Pages: [1] 2 3 ... 9 Reply Ignore Print 
YaBB SE Community  |  Development  |  Completed mods  |  [Done 1.5.2] SearchNew Mod v.09 « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.016 seconds with 19 queries.