{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)
Suggested Hosts
User avatar
DFORMS
Registered User
Posts: 225
Joined: Sun May 30, 2010 12:13 am

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

Post by DFORMS »

Got it to show recent activity in threads but the links wont work : s 'The webpage "www.viewtopic.php" cannot be found' Here is the code i have in my lasttopic.php :

Code: Select all

<?php

//Path to the forum config.php file
include "forum/config.php";

//Forum address, without dash at the end

$forum_address = "http://qc-a.ca/forum/index.php";

//Number of the latest topics

$latest = 25;

$link = $link = mysql_connect("$dbhost", "$dbuser", "$dbpasswd");

if (!$link)

{

   die('Not connected : ' . mysql_error());

}

$db_selected = mysql_select_db("$dbname", $link);

if (!$db_selected)

{

   die ('Can\'t use foo : ' . mysql_error());

}

mysql_query("SET NAMES UTF8");

$get_url = "SELECT config_name, config_value FROM $table_prefix".config." WHERE config_name = 'server_name' LIMIT 0,1";

$url = mysql_query($get_url);

$url = mysql_fetch_array($url);
$latest_topics;
//to add excluded forum add "AND forum_id<>$id_to_the_forum" after "topic_approved = '1'"
$latest_topics = "SELECT * FROM $table_prefix".topics." WHERE topic_approved = '1' AND forum_id<>17 ORDER BY topic_last_post_time DESC LIMIT 0,$latest";

$topics = mysql_query($latest_topics);

while($row = mysql_fetch_array($topics))
{
   extract($row);
   $date = date("d.m.Y", $topic_last_post_time);
?>
   <a href="http://<?php $forum_address; ?>/viewtopic.php?f=<?= $forum_id ?>&t=<?= $topic_id ?>" title="<?= $topic_title ?>"><?= $topic_title ?></a> / <?= $date ?> / replies (<?= $topic_replies ?>)<br>
<?php
}
?>
And the one in my index.html :

Code: Select all

<iframe src ="lasttopic.php" width="80%" height="130%" frameborder="0" border="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
Can someone help me out with this?

Thank you so much!
User avatar
DFORMS
Registered User
Posts: 225
Joined: Sun May 30, 2010 12:13 am

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

Post by DFORMS »

OK, i got it to work oufff : ) I'm a newb, no shame : s Thanks anyways guys!

I had to add the forum address on line 54 :? didn't see it at first. I try to follow the instructions step by step but sometimes some little details like that one are left out cause there so basic, i guess...

Code: Select all

<a href="http://qc-a.ca/forum<?php $forum_address; ?>/viewtopic.php?f=<?= $forum_id ?>&t=<?= $topic_id ?>" title="<?= $topic_title ?>"><?= $topic_title ?></a> / <?= $date ?> / replies (<?= $topic_replies ?>)
I guess now my question would be, how to fix the issue of displaying special characters? Some of you might of notice, because of my broken English, that i speak French and the site is for users from Québec.

Thank you!
User avatar
DFORMS
Registered User
Posts: 225
Joined: Sun May 30, 2010 12:13 am

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

Post by DFORMS »

Well i fixed it!

On line 76 of my <lasttopics.php> i change the charset from : UTF8 to : ISO-10646

Code: Select all

mysql_query("SET NAMES ISO-10646");


Now trying to display last user to post reply.
evepowr
Registered User
Posts: 85
Joined: Sun Jan 04, 2004 6:54 pm

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

Post by evepowr »

any luck murdock and finishing that?
User avatar
murdock
Registered User
Posts: 20
Joined: Wed Nov 19, 2003 1:47 am
Location: New Jersey

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

Post by murdock »

Actually...yes.

I have a new version (5). And honestly, I have forgotten what doesn't work. I think the RSS stuff works now, but I'm not sure. I would be glad to help anyone get it working though. Also, if anyone has those templates from a few posts up, I could include them in the zip.

The download is at http://www.njlanparty.com/downloads/top ... here_5.zip

Let me know if something doesn't work, or is missing.

Thanks,
Murdock
User avatar
DFORMS
Registered User
Posts: 225
Joined: Sun May 30, 2010 12:13 am

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

Post by DFORMS »

thread_name by user

I would like the user's name to be the same color used in the forum and to also be a link to his profil.

Here is a part of the code used to show recent threads with name and date :

Code: Select all

   <br /><a href="http://qc-a.ca/forum<?php $forum_address; ?>/viewtopic.php?f=<?= $forum_id ?>&t=<?= $topic_id ?>" title="<?= $topic_title ?>"><?= $topic_title ?></a> par <?php echo " $topic_last_poster_name"; ?><br /><br /> [ <?= $date ?> ] (<?= $topic_replies ?>) R&eacute;ponses<br /><br /><hr>
<div valign="top">  
How can i add this to it?

Code: Select all

get_username_string('full', $user->data['user_id'], $user->data['username'], $user->data['user_colour']
If someone can help me out that would be great and if its not to much to ask mabe elaborate on this cause i realy want know more about PHP, thanks!
eug127
Registered User
Posts: 1
Joined: Fri Jun 18, 2010 7:21 am

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

Post by eug127 »

That was genius, thank you and everyone for their help. Got it done in 20 mins. I had to register on this forum to thank everyone, probably would never been able to do it myself.

i also found this highlighted part of code to use in the lasttopic.php file so that the iframe opened in a new window.

<a target="_blank" href="http://www.perfectengagementstory.com/forum/viewtopic.php?f=<?= $forum_id ?>&t=<?= $topic_id ?> title="<?= $topic_title ?>"><?= $topic_title ?></a> / <?= $date ?> / replies (<?= $topic_replies ?>)<br>
<?php
User avatar
DFORMS
Registered User
Posts: 225
Joined: Sun May 30, 2010 12:13 am

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

Post by DFORMS »

DFORMS wrote:thread_name by user

I would like the user's name to be the same color used in the forum and to also be a link to his profil.

Here is a part of the code used to show recent threads with name and date :

Code: Select all

   <br /><a href="http://qc-a.ca/forum<?php $forum_address; ?>/viewtopic.php?f=<?= $forum_id ?>&t=<?= $topic_id ?>" title="<?= $topic_title ?>"><?= $topic_title ?></a> par <?php echo " $topic_last_poster_name"; ?><br /><br /> [ <?= $date ?> ] (<?= $topic_replies ?>) R&eacute;ponses<br /><br /><hr>
<div valign="top">  
How can i add this to it?

Code: Select all

get_username_string('full', $user->data['user_id'], $user->data['username'], $user->data['user_colour']
If someone can help me out that would be great and if its not to much to ask mabe elaborate on this cause i realy want know more about PHP, thanks!
Still havent found the solution : s Anyone?

Thank you!
User avatar
PlanetMelb
Registered User
Posts: 135
Joined: Sat May 10, 2003 5:19 am

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

Post by PlanetMelb »

murdock wrote:The download is at http://www.njlanparty.com/downloads/top ... here_5.zip

Let me know if something doesn't work, or is missing.

Thanks,
Murdock
Thanks for your efforts

Excuse my ignorance but how does one implement this? I too have been looking for a Topics Anywhere for phpBB3 forever

Do I just put the topics_anywhere_5.php in the root directory and call it thru my browser?
radiantx2
Registered User
Posts: 28
Joined: Thu Dec 21, 2006 6:53 pm

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

Post by radiantx2 »

Yes, any instructions on how to install this new topics_anywhere_5 ???

The old topics anywhere script you just called it through your browser and it gave you options to implement posts on your pages via javascript, iframe, or php.

I tried calling this file through my browser and was hit with a gazillion errors LOL.
ChrisE
Registered User
Posts: 2
Joined: Thu May 06, 2004 9:56 am

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

Post by ChrisE »

So, I like many others in this thread am unable to migration from phpbb2.x to 3.x until I am able to replicate the functionality of topics_anywhere.php in version 3.

I went through the thread, downloaded the topics_anywhere_5, copied the templates from my current topics_anywhere install on phpbb2 to the relevant folders in version 3. Changed the /en-us/ to /en/, got the setup screen to display properly and give me a new url to insert into my html page (ok it's actually .php but 99% html). Anyway, I can't get it work, basically nothing displays on the html page, both using my original string from phpbb2, and a newly generated string.

Few things though, I can't figure out how it could have worked for anyone else due to:

A) line 1917 references the include file "functions_post'. That file is a phpbb2 file, it doesn't exist in phpbb3. In phpbb3 there is a "functions_posting" but you can't just use that file as it's missing the"prepare_message" function used on line 1920. I ended up copying the phpbb2 functions_post into the include folder of phpbb3, which removes the error about prepare_message being undefined, but I think all of that is just for the setup screen anyway.

So the sum up, had to do some mods not mentioned in this thread, so I'm not sure if they were just neglected mentions, or if something else is up. Either way, although I get no errors, nothing displays. Any suggestions for trouble shooting?

I guess this is mostly directed towards Murdoch, even though his last post in this thread was 9 months ago.
ChrisE
Registered User
Posts: 2
Joined: Thu May 06, 2004 9:56 am

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

Post by ChrisE »

radiantx2 wrote:Yes, any instructions on how to install this new topics_anywhere_5 ???

The old topics anywhere script you just called it through your browser and it gave you options to implement posts on your pages via javascript, iframe, or php.

I tried calling this file through my browser and was hit with a gazillion errors LOL.
Well, this is what I see on my phpbb2 setup:

phpbb2/topics_anywhere.php
phpbb2/templates/subSilver/topics_anywhere_body.tpl
phpbb2/templates/subSilver/topics_anywhere_result.tpl
phpbb2/templates/subSilver/topics_anywhere_result_rss.tpl
phpbb2/language/lang_english/lang_topics_anywhere.php

In phpbb3 under language it's probably /en/ instead of /lang_english/
in version 5 on lines 73,74,289 it says "/en_us/" so if your lang folder is /en/ or anything other than /en_us/ you'll have to change those in the code.

I could zip up the tpl and lang file and post it somewhere if that would be useful
forgothowtocode
Registered User
Posts: 25
Joined: Tue Feb 07, 2012 8:41 pm

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

Post by forgothowtocode »

Any saints out there that have this working for the classifieds mod? :D
R1cky Da Man
Registered User
Posts: 18
Joined: Fri Feb 17, 2012 10:03 am

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

Post by R1cky Da Man »

Ahhh im looking for this also.
If anyone has made any progress?
User avatar
DFORMS
Registered User
Posts: 225
Joined: Sun May 30, 2010 12:13 am

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

Post by DFORMS »

You guys want to display recent threads on your website's index page like news articles?

Return to “[3.0.x] MOD Requests”