1 (edited by vulture 2006-04-07 05:13)

Topic: Showing forums on other page

I want to show some particular categories on other pages. Not the whole forums itself, just specific categories.

For example, i might want to have only the "Gaming" category on /gaming.php

Can I do that?


--


I would even be happy to be able to show the forums on more than one page, if that's possible.

Re: Showing forums on other page

Also, is there a way i can use the same login system for two forums?

Re: Showing forums on other page

vulture wrote:

Also, is there a way i can use the same login system for two forums?

http://punbb.org/forums/viewtopic.php?id=8755

vulture wrote:

I want to show some particular categories on other pages. Not the whole forums itself, just specific categories.

For example, i might want to have only the "Gaming" category on /gaming.php

Can I do that?

Have you looked at extern.php yet? I don't quite understand what you're asking, but that might help.

Looking for a certain modification for your forum? Please take a look here before posting.

Re: Showing forums on other page

Copy viewforum.php and add this to the forum fetch query: WHERE id=<id_of_gaming_forum>

Re: Showing forums on other page

where in the query does it go then... after what, before what....

thanks
m

Re: Showing forums on other page

Sorry, it seems it's in index.php =o

Anyways, this is the one:

// Print the categories and forums
$result = $db->query('SELECT c.id AS cid, c.cat_name, f.id AS fid, f.forum_name, f.forum_desc, f.redirect_url, f.moderators, f.num_topics, f.num_posts, f.last_post, f.last_post_id, f.last_poster FROM '.$db->prefix.'categories AS c INNER JOIN '.$db->prefix.'forums AS f ON c.id=f.cat_id LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE fp.read_forum IS NULL OR fp.read_forum=1 ORDER BY c.disp_position, c.id, f.disp_position', true) or error('Unable to fetch category/forum list', __FILE__, __LINE__, $db->error());

That can be changed to:

// Print the categories and forums
$cid_sql = isset($_GET['cid']) ? "c.id=".intval($_GET['cid']) . " AND" : '';
$result = $db->query('SELECT c.id AS cid, c.cat_name, f.id AS fid, f.forum_name, f.forum_desc, f.redirect_url, f.moderators, f.num_topics, f.num_posts, f.last_post, f.last_post_id, f.last_poster FROM '.$db->prefix.'categories AS c INNER JOIN '.$db->prefix.'forums AS f ON c.id=f.cat_id LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE '.$cid_sql.' fp.read_forum IS NULL OR fp.read_forum=1 ORDER BY c.disp_position, c.id, f.disp_position', true) or error('Unable to fetch category/forum list', __FILE__, __LINE__, $db->error());

Then, for a certain category, use this link:
index.php?cid=1 (change 1 to category id)

*goes to add it in the wiki*

7 (edited by ekleekle 2006-04-29 20:38)

Re: Showing forums on other page

Thx for the help...

so, I thought I would just have to copy the viewforum code to a new page and then change sth ...



i want to have a new page when Apartments (on the left) is clicked on... with its own ads.

and then a link for Going out (lets say), which goes to another page with its own ads, etc etc

speaking of ads... how can I make them be next to each other... and not on top.
I thought <br> would do it, but not....

appreciate the help!
Merci  (sorry, no Flemish)

m

Re: Showing forums on other page

Ik kan het anders ook in het Vlaams uitleggen? =P

Anyways, to make images go next to each other, use this:

<img src="" alt="" style="float: left" />

You don't need to use the style attribute in your last ad though, or your text will come next to it too.

Re: Showing forums on other page

what out... I do speak german and almost understood that!

ok, i'll do that.

any suggestions as to what I want to do? different pages and all?

thx
m