php forum
php mysql forum
php mysql smarty
 
Page 7 of 9 < 1 2 3 4 5 6 7 8 9 >
Topic Options
#199721 - 07/12/04 07:19 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
DocDoom Offline
Member

Registered: 09/09/01
Posts: 64

   Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed to Del.icio.us Add to del.icio.us
  Digg Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed Digg it
sooo... how hard would it be to modify UBBNews so that it takes the last post of any thread, rather than the first, and picks the topics by newest post, rather than newest original topic?
_________________________
my board :^)

Top
#199722 - 07/12/04 09:45 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus
Developer

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
I haven't looked into that, as it was designed as more of a News function than an expanded content island. I'm pretty sure there is some metadata somewhere that stores that data. Then it would be a matter of parsing the metadata, looking up the topic file, fetching the appropriate Z line, and printing it.
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199723 - 07/14/04 06:12 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
DocDoom Offline
Member

Registered: 09/09/01
Posts: 64
thanks... definitely way beyond my abilities!
_________________________
my board :^)

Top
#199724 - 07/15/04 03:02 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Administrator Online   shocked
Wizard

Registered: 01/10/00
Posts: 5123
Loc: Portland, OR, USA
This is the best script to learn customization on; with a few tweaks you can have it post every line in the post :x... Then theres the customization of having it work with bookmarks (#postid) like I have at UGN Security ... The script is deffinately a time saver wink ...
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design Owner

Top
#199725 - 07/15/04 05:12 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus
Developer

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
I do have a new version of this as a PHP function which utilizes the spider friendly functions of the latest version of UBB, but it's acutally a function instead of an include (part of a bigger change I'm working on with my site). I could probably move the code into the .php and still use release it...

Jumping to the latest post in the topic. Now that's an idea....
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199726 - 07/15/04 06:00 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Administrator Online   shocked
Wizard

Registered: 01/10/00
Posts: 5123
Loc: Portland, OR, USA
Lol, here we're waiting on new releases and you've totally redone it :-x... Hey, so long as theres no bugs, it's smaller, and more efficient, can't hurt to release it wink ...
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design Owner

Top
#199727 - 07/15/04 07:12 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus
Developer

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
So far, the only real change besides converting it to a function in my UBB class file is the spider friendly. I may try to stick a "Hop to Last post" in it. I'm also looking at adding some Javascript for the times that was posted earlier in the thread. I'm also thinking about a couple of layout changes to it...
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199728 - 08/13/04 03:07 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
bryan868 Offline
Member

Registered: 09/18/00
Posts: 273
Is this hack what's being used for the news at www.ubbdev.com?
_________________________
This is the designed behavior.

Top
#199729 - 08/13/04 01:22 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Administrator Online   shocked
Wizard

Registered: 01/10/00
Posts: 5123
Loc: Portland, OR, USA
No, UBBDev is using something else for news (should be a perl news modification).

Sub, sounds good; I'd love to see a function for "hopping" to the story; see what I have at UGN Security ... As is I have this addon twice (news.php and header.php); be cool to "consolidate" wink
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design Owner

Top
#199730 - 08/13/04 02:40 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus
Developer

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
Hey Gizzy, would you mind shooting your code to me to peek at? I would like to see what kind of tweaks you have made to it. I might actually incorporate some of them if you don't mind wink

Also, you shouldn't have to have 2 separate instances of the PHP, you should just be able to include it twice on the page with different query strings. That is unless you are doing different layouts, then you would need to.
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199731 - 08/14/04 02:06 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Administrator Online   shocked
Wizard

Registered: 01/10/00
Posts: 5123
Loc: Portland, OR, USA
Well see the one (headlines.php) is just "jump down" links to the data displayed... But no problem; get it here .

I know it's all pretty dirty but still gets the job done...

Hit me up on AIM (lordmoguai) or IRC (irc.undergroundnews.com #undergroundnews) if you need me.
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design Owner

Top
#199732 - 08/14/04 11:03 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus
Developer

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
While I do some thinking, here's how you can spider friendly those links (assming you can use the short version safely):

Find:
$morepath = $CGIURL . "/ultimatebb.cgi?ubb=get_topic;f=" . $forum . ";t=" . $topicnum;

Replace with:
$morepath = $CGIURL . "/ultimatebb.cgi/ubb/get_topic/f/" . $forum . "/t/" . $topicnum;

Find:
$authorurl = $CGIURL . "/ultimatebb.cgi?ubb=get_profile;u=" . $authorid;

Replace with:
$authorurl = $CGIURL . "/ultimatebb.cgi/profile/" . $authorid;

Find:
$commentpath = $CGIURL . "/ultimatebb.cgi?ubb=reply;f=" . $forum . ";t=" . $topicnum;

Replace with:
$commentpath = $CGIURL . "/ultimatebb.cgi/ubb/reply/f/" . $forum . "/t/" . $topicnum;
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199733 - 08/14/04 02:29 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Administrator Online   shocked
Wizard

Registered: 01/10/00
Posts: 5123
Loc: Portland, OR, USA
Interesting, I'll get it installed when i have some free time wink
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design Owner

Top
#199734 - 08/14/04 02:42 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Administrator Online   shocked
Wizard

Registered: 01/10/00
Posts: 5123
Loc: Portland, OR, USA
Well, that's done; works nicly, thanks smile .
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design Owner

Top
#199735 - 10/02/04 06:02 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
DocDoom Offline
Member

Registered: 09/09/01
Posts: 64
just wondering... is there a way to create hidden forums that can contain topics that will show up in ubbnews, but will *not* show up in the "today's active topics" list?
_________________________
my board :^)

Top
#199736 - 10/06/04 04:01 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus
Developer

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
With the stock behavior, no. That was a safety feature implemented to prevent people from farting around and trying to get private forums.

Reading private forums isn't hard to hack in. You would need to know the forum key, as you cannot count on always being able to read vars_forums., then it is a matter of assembling the path, and parsing the appropriate files.

Keep in mind, if anyone knew the URL to the page, your private forum topics would be compromised, hence the reason for the current behavior.
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199737 - 10/06/04 04:25 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
from my experience, if you set a forum as hidden, but not private, you should be able to use the feed for it. Although as Sub said, it's not a well hidden forum is we all know where it is wink
_________________________
Code monkey like Fritos

Top
#199738 - 06/04/05 06:42 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
for those who still use this, I've been rewriting my scripts and wrote this function up

Code:
function fix_smilies( $string )
{

	$string = preg_replace('/src="graemlins//', 'src="/ubb/graemlins/', $string);
	$string = preg_replace('/src="([^/]+?)"/', 'src="/ubb/$1"', $string);

	return $string;
}
change the 'ubb' if your noncgi directory is named something else
_________________________
Code monkey like Fritos

Top
#199739 - 06/04/05 11:06 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25434
Loc: Texas
grazi smile
_________________________
- Allen wavey
- What Drives You?

Top
#199740 - 08/23/05 08:39 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
twslex Offline
Member

Registered: 06/13/02
Posts: 100
OK,

been playing around with this one, now the latest threads do not come up, but the threads with the latest posts.

Code now looks like this, i have renamed it into ubbnews2.php:

Code:
<?
// ubbnews2.php
// Reads the UBB for the latest topic in a forum, and displays a teaster of it on a page
// Required Paramater -- forum=## where ## is the forum number requested
// Optional Paramter  -- threads=# where # is the number of threads to tease (5 limit)

$varspath = "<NonCGIPath>";  # Take this from the NonCGI Path setting in your cp.cgi
include("$varspath/vars_config.inc.php");

$forum = $_GET['forum'];
$threads = $_GET['threads'];
$threads = (isset($threads) && $threads) ? $threads : 1;

// If you dare, you can adjust the max number to tease by adjusting the number in the next 2 lines
// ******* WARNING - DO NOT REMOVE/COMMENT OUT THE CHECK! ********
if ($threads > 5)
   $threads = 5;

if ($forum)
{
   $ubbnewspath = $NonCGIPath . "/" . "Forum";
   $threadspath = $ubbnewspath . $forum . "/" . "forum_" . $forum . ".threads";
   if (file_exists($threadspath))
   {
      $thread_data = file($threadspath);
      $thread_count = count($thread_data);
      array_pop($thread_data);
      array_pop($thread_data);
      array_pop($thread_data);
      array_pop($thread_data);
      $thr_data2 = array_reverse($thread_data);
      array_pop($thr_data2);
      sort($thr_data2);
      $thr_data = array_reverse($thr_data2);
      $thr_start = 0;
      $thr_array = $threads--;
      $real_count = count($thr_data);
      if ($real_count < $thr_array)
      $thr_array = $real_count;
   }
   else
   {
      $thr_array = 0;
      echo "Unable to read .threads file.  Either you are trying to access a private forum, or you need to Rebuild your forum stat files.";
   }
   $count = 0;
   $mereal_count = $real_count;
   
   while($real_count)
   {
       $real_count--;
       $extrame[$real_count] = "";
       $extrameme = $extrame[$real_count];
       $extrathisone = $thr_data[$real_count];
       $extrameme= explode("!", $extrathisone);
       $extrame[$real_count][0] = $extrameme[0];
       $extrame[$real_count][1] = $extrameme[1];
       $extrame[$real_count][2] = $extrameme[2];
       $extrame[$real_count][3] = $extrameme[3];
       $extrame[$real_count][4] = $extrameme[4];
   }
   while($real_count <= $mereal_count)
   {
       $extrame2[$real_count] = "!" . $extrame[$real_count][3] . "!"  . " => " . "!" . $extrame[$real_count][1] . "!";
       $real_count++;
   }
   rsort($extrame2);
   
   $thr_data = $extrame2;
   
   while ($count < $thr_array)
   {
      if ($count > 1)
         echo "

";
      $thisone = $thr_data[$thr_start];
      $getme = explode("!", $thisone);
      $getme2 = $getme[3];
      $topicnum = trim($getme2);
      $maxTextLenght=850;
      $ubbnewspath = $NonCGIPath . "/" . "Forum";
      $newsitem = $ubbnewspath . $forum . "/" . $topicnum . ".cgi";
      $newsdetail = file($newsitem);
      $num_lines = count ($newsdetail);
      $comment_count = $num_lines - 2;
      $aline = explode("&#0124;&#0124;", $newsdetail[0]);
      $zline = explode("&#0124;&#0124;", $newsdetail[1]);
      $author = $aline[8];
      $authorid = $aline[9];
      $authorurl = $NonCGIURL . "/ultimatebb.php?ubb=get_profile;u=" . $authorid;
      $title = $aline[4];
      $postdate = $zline[3];
      $posttime = $zline[4];
      $aspace=" ";
      if(strlen($zline[6]) > $maxTextLenght )
      {
         $postdet = substr(trim($zline[6]),0,$maxTextLenght);
         $postdet = substr($postdet,0,strlen($postdet)-strpos(strrev($postdet),$aspace));
         $bot = strpos($postdet, "<blockquote>");
         $bct = strpos($postdet, "</blockquote>");
         if (($bot!==FALSE) and ($bct===FALSE))
         {
            $postdet = $postdet . "</blockquote>";
            $nodots = "TRUE";
         }
         $lot = strpos($postdet, "<ul");
         $lct = strpos($postdet, "</ul>");
         if (($lot!==FALSE) and ($lct===FALSE))
         {
            $postdet = $postdet . "</ul>";
            $nodots = "TRUE";
         }
         if ($nodots != "TRUE")
            $postdet = $postdet . '...';
      }
      else
      {
         $postdet = $zline[6];
      }
      echo "<b>$title</b>
";
      echo "<font size="1">";
      print("Posted: $postdate $posttime by <a href="$authorurl">$author</a>");
      echo "</font>
";
      echo "
";
      print($postdet);
      $morepath = $NonCGIURL . "/ultimatebb.php?ubb=get_topic;f=" . $forum . ";t=" . $topicnum;
      echo "&nbsp;&nbsp;&nbsp;";
      echo "<a href="$morepath">Read More...</a>";
      echo "
";
      $commentpath = $NonCGIURL . "/ultimatebb.php?ubb=reply;f=" . $forum . ";t=" . $topicnum;
      echo "<a href="$commentpath">Comments ($comment_count)</a>

";
      $count++;
      $thr_start++;
   }
}

Top
Page 7 of 9 < 1 2 3 4 5 6 7 8 9 >


Moderator:  Charles, Gizmo 
Who's Online
2 Registered (Gizmo, blaaskaak), 29 Guests and 3 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Team UBBDev Rides Again!
by AllenAyres
Yesterday at 01:36 PM
Blogs, love em or hate em?
by AllenAyres
10/07/08 02:05 PM
What do you use to edit the files
by Ian_W
10/05/08 03:33 PM
BeyondCompare v3.00
by Ian_W
10/05/08 03:32 PM
Glossy Black Theme with Image Reflection
by Gizmo
10/05/08 02:17 PM
ShareThis
by Gizmo
09/28/08 05:06 AM
[7.3] Viewing MySQL logfiles made easier
by AllenAyres
09/27/08 09:57 PM
New Mods
[7.3] Viewing MySQL logfiles made easier
by blaaskaak
09/24/08 05:39 PM
[7.3.1] add search to showmembers page
by blaaskaak
09/07/08 04:50 AM
Newest Members
Kevs, pisa666, ghengis317, NitroX, Dogan
13346 Registered Users
Top Posters Last 30 Days
AllenAyres 11
blaaskaak 6
Chris Bale 4
Gizmo 4
FREAK1 4
Ian_W 4
tackaberry 4

 

 

 
fusionbb message board php hacks