• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

country-list at homepage and categories or forums per country

erich37

Well-known member
#1
I am thinking of having on the Homepage just a list of about 120 countries, so nothing else but countries and the logo. Probably having a static page or preferable a XF-page with just a list of countries.

Then when a user clicks on any country, he will be forwarded to the Forum, or respectively to the Country-Category or Country-Forum.

So literally I would like to run a Forum for each of about 120 countries, but I do not want to have those 120 countries listed as Forums or Categories on the Homepage itself.

So for example similar to Craigslist, where you have a list of countries and then being directed to the country-category or country-forum.

How to do this ?

Appreciate your help.
 

James

Well-known member
#3
If you set your node lists to not display then they won't actually appear on the forum listing, but you can access them via their respective URLs.


You could then create hyperlinks from each country to their respective forum/category. A lot of manual labour...

Ninja'd :( I'mma blame the image uploading...
 

erich37

Well-known member
#4
thanks Brogan!

this is what I was thinking about, but how do I get a XF-page being the Homepage?
Or how do I get the "Country-List" to be shown on the Homepage, without the need of creating a XF-page?
 

James

Well-known member
#6
thanks Brogan!

this is what I was thinking about, but how do I get a XF-page being the Homepage?
Or how do I get the "Country-List" to be shown on the Homepage, without the need of creating a XF-page?
Never tried it before, but you could use .htaccess (assuming you use apache) to set your default homepage to the XF page:
http://www.javascriptkit.com/howto/htaccess6.shtml

EDIT: If this doesn't work, create a new PHP file in your root called home.php and put inside:
PHP:
<?php header('Location: path/to/xf/page'); ?>
Then update your .htaccess to:
Code:
DirectoryIndex home.php
 

Brogan

XenForo moderator
Staff member
#8
Never tried it before, but you could use .htaccess (assuming you use apache) to set your default homepage to the XF page:
http://www.javascriptkit.com/howto/htaccess6.shtml
That's what I do, in conjunction with a home.php file to use one of my Pages as a 'home' page.

either one of those 2 options..... probably easier and better on this page:http://xenforo.com/community/
That would require editing the forum_list template in that case.
You could create a new template and include it in forum_list.
 

erich37

Well-known member
#10
is there a specific template which I could use as an example of how this "new template" should look like ? Or is it just plain HTML with some div-tags ?
 

Brogan

XenForo moderator
Staff member
#11
It's a custom template so it would be up to the individual (i.e. you) how it would look.

You need to come up with a design/layout and then people can help you getting it set up.
 

James

Well-known member
#12
Wait a minute... I've just had a brainwave.

XenForo pages are stored as templates, right? So why can't we just edit the forum_list template to something like:
Code:
<xen:include template="_page_node.id" />
Erich doesn't want the forum list showing anyway, so why not do it that way... hmm...
 

Brogan

XenForo moderator
Staff member
#13
Yes, you can do that no problem although essentially that would be no different to creating your own template and including it.

Ultimately though he needs to come up with a design and layout for the template, whichever one he decides to use.
 

erich37

Well-known member
#16
Having a XF-page with a list of countries..... and then having this at the Homepage like "xenforo.com"..... that would be perfect I guess....

So the other question is: how to create a XF-page as being the Homepage.... at domain.com
? Do we have a tutorial for this somewhere already?
 

Brogan

XenForo moderator
Staff member
#17
and then having this at the Homepage like "xenforo.com"..... that would be perfect I guess....
If you install the forum in the root instead of e.g. /community and replace the forum_list template with your custom code then it should work.

A fairly different approach to a forum but if that's what works for you...why not.
 

James

Well-known member
#18

Brogan

XenForo moderator
Staff member
#19
Would this then allow Eric to use the default XF classes, such as newIndicator, instead of creating a whole new stylesheet?
I'm not entirely sure as I've never tried to use all of the classes.
But certainly classes such as sectionMain, primaryContent, etc. all work.

However, he wouldn't need the newIndicator class or any others to do with posts, etc. as it would just be an entry page with a list of countries.
 

James

Well-known member
#20
I used that class because it was the first one I came across during my inspect element.

I'm not sure if there's any benefit between using a template or using a page node to include in forum_list. Does the page node have any benefits over a template when the classes are applied?