PDA

View Full Version : Some help needed for the main page



Jeff
11th November 2008, 09:49 PM
The main page is almost done, the only things that aren't finished are the search box, the news, and the login form (if we need it). Someone suggested in another thread that we set the news up so that it comes directly from the forums, which I think is a great idea. If we do that, we won't need to log in separately to the main site to post there. So the questions are:
-Can a forum be set up here where only certain members can post, but anyone can reply?
-If not, would it be easy to add that functionality? (I know we'd have to poke Kevin to do that, but we'd have to do so anyway to upload the site)
-Does anyone here have the PHP experience and familiarity with the VB database layout to display posts from the forums on the main page?

Failing that, we'd have to either write a news system ourselves (ugh), or use one that already exists. Either of those would require a separate login.

Also, there's the search box. I'm sure it would be easy to get that working, considering how just about every site out there has one, I just don't know how to get it working. So if anyone knows, that'd be great.

Crystalmaster Mike
15th November 2008, 01:48 PM
Don't the Announcements work in a similar way?

Now, if you just make a Forum in which making Threads is prohibited for normal members, and you make the News posters Mod of that forum, the ball is a-rolling.

Phoenixsong
15th November 2008, 03:56 PM
After I suggested that I did a quick search around to see what was available. At first glance, it looks like Kevin might need to go get the vBAdvanced plugin; I haven't been able to figure out exactly what it does, and there's every indication that it might be its own portal/website system entirely instead of just increased functionality, but supposedly it allows one to display posts from a certain forum on the front page of the site. It definitely needs more looking into and probably won't prove to be an option (especially since I can't tell whether or not it's free), but it's there.

What originally gave me the idea was this set of instructions here (http://community.mybboard.net/showthread.php?tid=22068). Rather obviously, it was made for MyBB and not vBulletin, but I don't know; some code guru out there, presumably someone familiar with the way vBulletin works, could probably make something similar.

As for the search, sites like Serebii and Psypoke just use Google search a la this (http://www.google.com/coop/cse/), unless I'm mistaken. I'm not sure what would be involved if you wanted to create a search function specifically for TPM.

Jeff
15th November 2008, 11:49 PM
I figured the code for pulling out the news posts would be fairly simple like that. The VB-based code should be somewhat similar, we just need someone familiar with the VB database to write it. We'll also need to look into what VB offers in terms of setting up privileges. I know anyone whose account here at TPM is a "donor" account can change their own username, so it sounds like custom groups could be set up and those groups can be given certain permissions, but I'm not sure. If this is true though, we could set some accounts to be "news poster" accounts and allow those members to post threads in the news forum.

Phoenixsong
16th November 2008, 12:18 AM
Other, much simpler forums offer custom group creation with access/special permissions like that, so quite honestly I would be surprised if vBulletin didn't. That sort of thing shouldn't take much time to set up at all.

Jeff
18th November 2008, 09:09 AM
I just checked out Google Custom Search. I don't even think we need something that complicated. As long as we can tell Google to search a specific website, we should be able to use some JavaScript to create the search URL, then load the search page.

Lady Vulpix
18th November 2008, 09:39 AM
-Does anyone here have the PHP experience and familiarity with the VB database layout to display posts from the forums on the main page?
Yes to this one... except for the database layout as I don't have access for a database. But if I did, I'd be able to do it. And even if I don't, there are some ugly workarounds that can be done.

Jeff
21st November 2008, 09:41 PM
Allright, weekend's here. Time for me to get back to work. I'll see what I can do with JavaScript for the search box. Also, Gabi, shouldn't all vBulliten databases be set up similarly? If so, querying TPM's database shouldn't be too hard to figure out. If not, would Chris be able to help, or would we need Kevin?

Lady Vulpix
24th December 2008, 12:04 PM
Even if I had another vBulletin database with which to compare it, I don't have the data required to set up a connection to the one on TPM. Therefore, no queries can be made.

Chris
24th December 2008, 12:08 PM
I can create customised RSS feeds based on posts made in forums, so I could create one based on threads made in a "news" subforum in GD, then only give certain people permission to post new threads to it. Then you could pull the RSS feed on the main page and customise its appearance.

Lady Vulpix
24th December 2008, 12:11 PM
That sounds good to me. :)

Jeff
24th December 2008, 01:43 PM
Yeah same here. Now I'll be able to write the display code in Javascript instead of PHP, which I really don't know yet. So that way, I'll now be able to finish the main page quicker.

Jeff
30th December 2008, 12:33 AM
It works! It works! It works! It works!

Just tried out the RSS/Javascript idea with a feed I borrowed from Bulbagarden, and as you might have guessed from the fist line of this post, my script works!

There are some issues displaying the é characters (and other unicode characters I'm sure). Seems like mismatched character encodings. I'll have to look into that, but other than that it's working great.