{REQUEST} - Topics Anywhere for phpBB 3.x.

Looking for a MOD? Have a MOD request? Post here for help. (Note: This forum is community supported; phpBB does not have official MOD authors)
Get Involved
Locked
User avatar
noth
Registered User
Posts: 2472
Joined: Fri Jan 07, 2005 7:10 pm
Location: North Surrey
Contact:

Re: {REQUEST} - Topics Anywhere for phpBB 3.x.

Post by noth » Sun Dec 30, 2007 8:53 pm

well I hope somebody can do 'Topics Anywhere' for phpBB3

it sure would be appreciated 8-)

User avatar
FaresNB
Registered User
Posts: 271
Joined: Tue May 22, 2007 11:50 am
Location: Syria
Name: Fares Alnaeb
Contact:

Re: {REQUEST} - Topics Anywhere for phpBB 3.x.

Post by FaresNB » Sun Dec 30, 2007 9:05 pm

Hi all

I finally found it

ENJOY !!!

Code: Select all

<style type="text/css">
#General_arabic {
   font-family: Tahoma;
   font-size: small;
   font-weight: bold;
   height: 100%;
   width: 100%;
   direction: rtl;
}

a:hover {
   text-decoration: underline overline;
}
a:link {
   text-decoration: none;
}

a {
   text-decoration: none;
   color: black;
}

a:visited {
   text-decoration: none;
}

</style>
    
<?php
    /**
    *
    * @package phpBB3
    * @copyright (c) 2005 phpBB.bz Group
    * @license http://opensource.org/licenses/gpl-license.php GNU Public License
    * 
    */

    /**
    * @ignore
    */
    define('IN_PHPBB', true);
    $phpbb_root_path = './';
    $phpEx = substr(strrchr(__FILE__, '.'), 1);
    include($phpbb_root_path . 'common.'.$phpEx);

//forums you do not want to show

$forums ='256,257';

// topics limit
$limit ='5';

 


$sql = "SELECT topic_id,topic_title
      FROM phpbb_topics
      WHERE forum_id    NOT IN ('$forums')
      AND topic_approved = 1 ORDER BY topic_id DESC LIMIT $limit";
$result = $db->sql_query($sql);

//echo $sql;

// show out put

echo "<div id='General_arabic'><ul>";
while ($line = mysql_fetch_array($result)) {
    echo "<li>";
    echo "<a  target='_blank' href='viewtopic.php?t=";
    echo $line[topic_id];
   echo"'>";
   echo $line[topic_title];
    echo "</a></li>";
    }
    echo "<ul></div>";


// Free resultset
mysql_free_result($result);
    

?>

Tritonforum.com
Registered User
Posts: 17
Joined: Tue Dec 11, 2007 2:30 am

Re: {REQUEST} - Topics Anywhere for phpBB 3.x.

Post by Tritonforum.com » Sun Dec 30, 2007 9:21 pm

That's great! :? Help a newb out.... Where do we put it, and what does it show?

User avatar
FaresNB
Registered User
Posts: 271
Joined: Tue May 22, 2007 11:50 am
Location: Syria
Name: Fares Alnaeb
Contact:

Re: {REQUEST} - Topics Anywhere for phpBB 3.x.

Post by FaresNB » Mon Dec 31, 2007 7:58 am

Tritonforum.com wrote:That's great! :? Help a newb out.... Where do we put it, and what does it show?
After you save it and upload it as a php file to your forum root

you can call it from any where on your web site by Iframe like this

Code: Select all

<iframe name="I1" id="I1" src="http://phpbb.com/bb/last_topics.php" marginwidth="1" marginheight="1" height="100%" width="100%" scrolling="no" border="0" frameborder="0">Your browser does not support inline frames or is currently configured not to display inline frames.
</iframe>
and don't forget to change the link

Code: Select all

http://phpbb.com/bb/last_topics.php
to the link you made

Good Luck

nizouille
Registered User
Posts: 64
Joined: Thu May 13, 2004 8:55 am

Re: {REQUEST} - Topics Anywhere for phpBB 3.x.

Post by nizouille » Mon Dec 31, 2007 11:16 am

that's not at all topics_anywhere ...
NOthing related to rss in your post FaresNB ...

Tom Keels
Registered User
Posts: 30
Joined: Wed Jun 05, 2002 2:29 pm

Re: {REQUEST} - Topics Anywhere for phpBB 3.x.

Post by Tom Keels » Mon Dec 31, 2007 3:56 pm

There is some kind of problem because I get this

[phpBB Debug] PHP Notice: in file /topics_anywhere.php on line 67: mysql_fetch_array(): supplied argument is not a valid MySQL result resource

Tom Keels
Registered User
Posts: 30
Joined: Wed Jun 05, 2002 2:29 pm

Re: {REQUEST} - Topics Anywhere for phpBB 3.x.

Post by Tom Keels » Mon Dec 31, 2007 4:00 pm

This works better...

Code: Select all

   $sql = "SELECT topic_id,topic_title
          FROM phpbb3_topics
          WHERE forum_id    NOT IN ('$forums')
          AND topic_approved = 1 ORDER BY topic_id ";
    //$result = $db->sql_query($sql);
    $result = $db->sql_query_limit($sql, $limit);
    //echo $sql;

    // show out put

    echo "<div id='General_arabic'><ul>";
    while (($row = $db->sql_fetchrow($result)) ) {
        echo "<li>";
        echo "<a  target='_blank' href='viewtopic.php?t=";
        echo $row[topic_id];
       echo"'>";
       echo $row[topic_title];
        echo "</a></li>";
        }
        echo "<ul></div>";

Tritonforum.com
Registered User
Posts: 17
Joined: Tue Dec 11, 2007 2:30 am

Re: {REQUEST} - Topics Anywhere for phpBB 3.x.

Post by Tritonforum.com » Tue Jan 01, 2008 5:23 am

I got this to work, but it doesn't show the latest topics? It looks like it shows the oldest. I used the modified code, from the last post. Any ideas?? Also, any way to trim the topic titles to a certain amount of characters? It would be nice to have them uniform.

etiennesk
Registered User
Posts: 15
Joined: Sat May 10, 2003 7:51 am

Re: {REQUEST} - Topics Anywhere for phpBB 3.x.

Post by etiennesk » Tue Jan 01, 2008 10:03 am

Change to AND topic_approved = 1 ORDER BY topic_id DESC";

Tom Keels
Registered User
Posts: 30
Joined: Wed Jun 05, 2002 2:29 pm

Re: {REQUEST} - Topics Anywhere for phpBB 3.x.

Post by Tom Keels » Tue Jan 01, 2008 2:24 pm

I ended up scrapping most of this code and rolling my own using some code from the Simple Syndication mod. I've got it working exactly like the old Topics Anywhere mod from 2.0.XX.

I've got most of the stuff hard coded. I'll see if I can parameterize it and post the code. If anyone wants my code as it stands, just PM me.

Tritonforum.com
Registered User
Posts: 17
Joined: Tue Dec 11, 2007 2:30 am

Re: {REQUEST} - Topics Anywhere for phpBB 3.x.

Post by Tritonforum.com » Tue Jan 01, 2008 4:47 pm

I did some reading on SQL last night, and figured out the DESC sort option, and it's working fine now. This mod fits the spot I wanted to fill on my front page perfect! Thanks!

mm.com2
Registered User
Posts: 10
Joined: Thu Dec 27, 2007 3:00 pm
Location: San José, Costa Rica
Contact:

Re: {REQUEST} - Topics Anywhere for phpBB 3.x.

Post by mm.com2 » Tue Jan 01, 2008 7:17 pm

works fine!!!

thanks!!

mm.com2
Registered User
Posts: 10
Joined: Thu Dec 27, 2007 3:00 pm
Location: San José, Costa Rica
Contact:

Re: {REQUEST} - Topics Anywhere for phpBB 3.x.

Post by mm.com2 » Wed Jan 02, 2008 11:31 pm

Ok, this is good for new post..


i need sort by date

i need the latest post...

User avatar
Highway of Life
Former Team Member
Posts: 6048
Joined: Wed Feb 02, 2005 5:41 pm
Location: Seattle, WA
Name: David Lewis
Contact:

Re: {REQUEST} - Topics Anywhere for phpBB 3.x.

Post by Highway of Life » Thu Jan 03, 2008 10:00 am

You lot are unbelievable. :shock:

You’re going to make us validate that MOD so that you don’t all kill yourselves in the process of trying to hack something together, aren’t you? :|
I’ve now merged four identical request topics into one because nobody seems to like the Search Function or Google. :|

As stated in the last identical request topic:
Subject: [REQUEST] Recent Posts on Home Page
Highway of Life wrote:For the record, we do not endorse, approve or support any code that has been posted in this topic.
Much of the code I have seen in this topic is very hacky, many appear unsafe. I would highly recommend NOT using the scripts previously provided.
Usage of these scripts could produce unpredictable results and could leave your board vulnerable to hacking.

I would suggest waiting for a MOD, or if you need it right away, there is a posts anywhere MOD for phpBB3, available for a small fee, or you guys can hang on for a little bit until it is released in the phpBB MOD Database.
There are a couple of MODs that can do this, though none validated yet and therefore we do not approve these MODs or scripts for usage on live boards.

[RC1] Display posts anywhere
[RC1] Recent Posts - Last Active Post Show phpBB3 Mod
[ALPHA] Topic Extraction (news, latest topics etc) - 0.2.1

If you guys can wait a bit, the [RC1] Display Posts anywhere MOD is awaiting validation.
The phpBB Weekly Podcast - Discussing the developments of phpBB4 and beyond.

New to phpBB3? Want to learn about programing?
Visit phpBB Academy at StarTrekGuide to learn how.

kinda
Registered User
Posts: 8
Joined: Wed Jan 02, 2008 3:44 am

Re: [REQUEST] Recent Posts on Home Page

Post by kinda » Thu Jan 03, 2008 11:09 pm

iv tryed this (and about 3 other codes) and none of them work, they all just give me a blank page?

is there anything anyone can think that could be stopping all the scripts iv tryed working? (maybe somethin in SQL or the folder CHMOD?) i really dont know, but every one has said these scripts work, but i just cant get them working.

Im using PHPBB2 with ad infinitum style if that helps.

Locked

Return to “[3.0.x] MOD Requests”