Seite 1 von 1

Portal

Verfasst: Di 15.Feb, 2005 09:47
von Blisk
Is there a MOD for EZ portal which show on a portal a Posts from 1 topic.
Like Jokes form Topic "Jokes" on EZ portal?

Verfasst: Di 15.Feb, 2005 10:33
von oxpus
Random or the last one?

Verfasst: Di 15.Feb, 2005 11:40
von Blisk
random everytime user visit portal

Verfasst: Di 15.Feb, 2005 12:07
von oxpus
Okay, I'll take a look the next days...

Verfasst: Di 15.Feb, 2005 12:13
von Blisk
ok TNX

Verfasst: Mi 16.Feb, 2005 10:06
von oxpus

Verfasst: Mi 16.Feb, 2005 10:07
von Blisk
file is corrupted, please upload it again.
TNX

Verfasst: Mi 16.Feb, 2005 10:44
von oxpus
Done. Retry it. Sorry.

Verfasst: Mi 16.Feb, 2005 10:58
von Blisk
didn't find this line

#
#-----[ OPEN ]--------------------------------------------------
#
portal.php

#
#-----[ FIND ]--------------------------------------------------
#
//
// Fetch Posts from Announcements Forum
//

Verfasst: Mi 16.Feb, 2005 11:00
von oxpus
Find another place. Best bevor the news block!

Verfasst: Mi 16.Feb, 2005 11:11
von Blisk
It works now.
I put it before birthday block.

But one thing.
I thought more about random post from TOPIC, and not topic itself, some topics have more posts (jokes).
And When the post is longer I hope about fiex size of box and a slider beside.

Verfasst: Mi 16.Feb, 2005 11:13
von oxpus
You have a link to the Topic under the post text.....
Regard: If you will load the full topic on the portal, the portal itself can slow down ;)

Verfasst: Mi 16.Feb, 2005 11:18
von Blisk
not a full topic, but only one random post from topics.
and now when a post is long, it streches up a box fully,
:D
or maybe better, fixed size box and scrolling text from post in it.
;)

I manage to do scrolling text.
but not how to make a bacground of
View Comments (Post your comment)
a light blue color?

Verfasst: Mi 16.Feb, 2005 15:52
von oxpus
Use a class. Look into your .css File in the template folder and search for something like cat... or th....
Use this class in the code block on portal_body.tpl like

Code: Alles auswählen

class="cattitle"
and refresh the browser window...

Hm, one random post from the forum... Not only the first post of a random topic...
Okay, try this:
Open the fetchposts.php, find

Code: Alles auswählen

	$sql = "SELECT t.*, u.username, pt.post_text, pt.bbcode_uid, p.enable_smilies
		FROM " . TOPICS_TABLE . " AS t, " . USERS_TABLE . " AS u, " . POSTS_TEXT_TABLE . " AS pt, " . POSTS_TABLE . " AS p
		WHERE t.forum_id = $fetch_forum_id
			AND t.topic_poster = u.user_id
			AND t.topic_first_post_id = p.post_id
			AND p.post_id = pt.post_id
			AND t.topic_status <> 2
		ORDER BY rand()
		LIMIT 1";
and replace this block with

Code: Alles auswählen

	$sql = "SELECT t.*, u.username, pt.post_text, pt.bbcode_uid, p.enable_smilies
		FROM " . TOPICS_TABLE . " AS t, " . USERS_TABLE . " AS u, " . POSTS_TEXT_TABLE . " AS pt, " . POSTS_TABLE . " AS p
		WHERE t.forum_id = $fetch_forum_id
			AND t.topic_poster = u.user_id
			AND t.topic_id = p.topic_id
			AND p.post_id = pt.post_id
			AND t.topic_status <> 2
		ORDER BY rand()
		LIMIT 1";
This may display a random post from the defined forum.

Verfasst: Do 17.Feb, 2005 08:05
von Blisk
It works.
TNX

Verfasst: Fr 04.Mär, 2005 13:21
von Blisk
Is it possible to have 2 of this?

Verfasst: Fr 04.Mär, 2005 15:53
von oxpus
From the same or from different forums?

Verfasst: Mo 07.Mär, 2005 07:58
von Blisk
For the different forums

Verfasst: Mo 07.Mär, 2005 10:30
von oxpus
So this snippet must install a second time.
With other variables , ACP settings, etc...
Or simply change the SQL and uninstall the part on the ACP!
Find:

Code: Alles auswählen

$sql = "SELECT t.*, u.username, pt.post_text, pt.bbcode_uid, p.enable_smilies
       FROM " . TOPICS_TABLE . " AS t, " . USERS_TABLE . " AS u, " . POSTS_TEXT_TABLE . " AS pt, " . POSTS_TABLE . " AS p
       WHERE t.forum_id = $fetch_forum_id
          AND t.topic_poster = u.user_id
          AND t.topic_id = p.topic_id
          AND p.post_id = pt.post_id
          AND t.topic_status <> 2
       ORDER BY rand()
       LIMIT 1";
and replace with

Code: Alles auswählen

$sql = "SELECT t.*, u.username, pt.post_text, pt.bbcode_uid, p.enable_smilies
       FROM " . TOPICS_TABLE . " AS t, " . USERS_TABLE . " AS u, " . POSTS_TEXT_TABLE . " AS pt, " . POSTS_TABLE . " AS p
       WHERE t.topic_poster = u.user_id
          AND t.topic_id = p.topic_id
          AND p.post_id = pt.post_id
          AND t.topic_status <> 2
       ORDER BY rand()
       LIMIT 2";