Welcome!
Log In
Create A New Profile
Home
>
Outdated forums
>
Phorum 5.1/5.0
>
5.1 Phorum Modules / Add-Ons
>
Topic
>
Page 2
Last X topics (and no posts)
Posted by Clément
|
March 10, 2005 08:18AM |
Registered: 10 years ago Posts: 832 |
I did, I just get a blank screen.
[www.assassinsunited.com]
Sergej
------------------------------------------
^AU^ Assassins United
[www.assassinsunited.com]
------------------------------------------
[www.assassinsunited.com]
Sergej
------------------------------------------
^AU^ Assassins United
[www.assassinsunited.com]
------------------------------------------
|
Re: Last X topics (and no posts) March 10, 2005 08:50AM |
Registered: 11 years ago Posts: 994 |
Here's the smarty assigns in case someone is interested.
I put the version from few messages above to my own server, added the lines here to the script and it worked. You could do something like print_r($p) or something to see what happens, or check php error log for parse errors etc.
So I quess you have something wrong with either database settings or otherwise.
Note. The "script must be run in phorum directory" isn't exactly true :-)
What I do is as follows:
cd to phorum directory,
include common.php
cd back to the current scripts directory
include ./phorum/latestthreads.php.
smarty assigns:
edit: hmm I put old assigns above.
It is also maybe better to sort the messages on message_id not date. In that case just do
---
-=[ Panu ]=-
Edited 2 time(s). Last edit at 03/10/2005 09:22AM by Panu.
I put the version from few messages above to my own server, added the lines here to the script and it worked. You could do something like print_r($p) or something to see what happens, or check php error log for parse errors etc.
So I quess you have something wrong with either database settings or otherwise.
Note. The "script must be run in phorum directory" isn't exactly true :-)
What I do is as follows:
cd to phorum directory,
include common.php
cd back to the current scripts directory
include ./phorum/latestthreads.php.
smarty assigns:
$smarty->assign("p", $p);
edit: hmm I put old assigns above.
It is also maybe better to sort the messages on message_id not date. In that case just do
$pkey[$key] = $data['message_id']; inside the foreach. and then sort by that field: array_multisort($pkey, SORT_DESC, $p);
---
-=[ Panu ]=-
Edited 2 time(s). Last edit at 03/10/2005 09:22AM by Panu.
|
Re: Last X topics (and no posts) March 10, 2005 09:31AM |
Registered: 11 years ago Posts: 994 |
Hmm, cleaned up version...
this is the smarty template snip to display the list:
---
-=[ Panu ]=-
Edited 1 time(s). Last edit at 03/10/2005 09:32AM by Panu.
this is the smarty template snip to display the list:
{section name=i loop=$p}
<p>
<span class="time">{$p.datestamp}</span><br/>
{$p.subject}<br/>{$p.author}: {$p.body}
</p>
{/section}
---
-=[ Panu ]=-
Edited 1 time(s). Last edit at 03/10/2005 09:32AM by Panu.
|
Re: Last X topics (and no posts) March 11, 2005 02:23AM |
Registered: 8 years ago Posts: 25 |
|
Re: Last X topics (and no posts) March 11, 2005 09:13AM |
Registered: 11 years ago Posts: 994 |
beverelli Wrote:
-------------------------------------------------------
> Dear Panu,
> i tried to implement your script in my home page
> but it doesn't work.
> The phorum index instead is in the /forum dir and
> i'm using version 5.0.14
>
> Could you give me the detailed instructions please
Well I try, but first I need to know how it exactly doesn't work?
you could do something like:
I suspect you don't have a working database connection or something.
---
-=[ Panu ]=-
-------------------------------------------------------
> Dear Panu,
> i tried to implement your script in my home page
> but it doesn't work.
> The phorum index instead is in the /forum dir and
> i'm using version 5.0.14
>
> Could you give me the detailed instructions please
Well I try, but first I need to know how it exactly doesn't work?
you could do something like:
echo "<pre>"; print_r($p); echo "</pre>"; before and after array_multisort($pkey, SORT_DESC, $p);line.
I suspect you don't have a working database connection or something.
---
-=[ Panu ]=-
|
March 19, 2005 07:31AM |
Registered: 10 years ago Posts: 832 |
I have been checking my own settings and from a blank screen I go into this:
Fatal error: Call to a member function on a non-object in /home/serbiad/public_html/rodoslovlje/phorum/latestthreads.php on line 80
Sergej
------------------------------------------
^AU^ Assassins United
[www.assassinsunited.com]
------------------------------------------
Fatal error: Call to a member function on a non-object in /home/serbiad/public_html/rodoslovlje/phorum/latestthreads.php on line 80
Sergej
------------------------------------------
^AU^ Assassins United
[www.assassinsunited.com]
------------------------------------------
|
Re: Last X topics (and no posts) March 20, 2005 01:35PM |
Registered: 11 years ago Posts: 994 |
Sergej Wrote:
-------------------------------------------------------
> I have been checking my own settings and from a
> blank screen I go into this:
>
> Fatal error: Call to a member function on a
> non-object in
> /home/serbiad/public_html/rodoslovlje/phorum/lates
> tthreads.php on line 80
Have you Smart installed?
The smarty line on the script is just an example. You should assign $p array to your own template or echo it's content directly.
---
-=[ Panu ]=-
-------------------------------------------------------
> I have been checking my own settings and from a
> blank screen I go into this:
>
> Fatal error: Call to a member function on a
> non-object in
> /home/serbiad/public_html/rodoslovlje/phorum/lates
> tthreads.php on line 80
Have you Smart installed?
The smarty line on the script is just an example. You should assign $p array to your own template or echo it's content directly.
---
-=[ Panu ]=-
|
March 22, 2005 06:39AM |
Registered: 10 years ago Posts: 832 |
Fixed
Sergej
------------------------------------------
^AU^ Assassins United
[www.assassinsunited.com]
------------------------------------------
Edited 1 time(s). Last edit at 03/22/2005 06:50AM by Sergej.
Sergej
------------------------------------------
^AU^ Assassins United
[www.assassinsunited.com]
------------------------------------------
Edited 1 time(s). Last edit at 03/22/2005 06:50AM by Sergej.
|
March 22, 2005 06:40AM |
Admin Registered: 10 years ago Posts: 8,791 |
you have nothing in there which outputs the actual data.
thats what panu told all the time yet,
Thomas Seifert
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting
thats what panu told all the time yet,
Thomas Seifert
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting
|
March 22, 2005 06:42AM |
Registered: 10 years ago Posts: 832 |
Dang you were fast. But, I am sorry to say I am kinda lost on what you mean. Any examples please ?
Sergej
------------------------------------------
^AU^ Assassins United
[www.assassinsunited.com]
------------------------------------------
Sergej
------------------------------------------
^AU^ Assassins United
[www.assassinsunited.com]
------------------------------------------
Sorry, only registered users may post in this forum.

