TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 206
  • Total: 206

New forum layout?!?

Started by Bec, September 28, 2009, 08:13:05 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

IchBin

Well, it can show as many recent topics as you want. But it doesn't do multiple pages of topics. You can have it display 20 or 50. It's a setting I've put into the code that you can choose. If you're ok with that, let me know and I'll try to put some finish touches on it tomorrow.

Bec

hey IchBin, sounds pretty good I can always link up to all forum posts or something in another area... look forward to seeing what you have come up with and thanks again for doing this! appreciate it heaps!! :)

IchBin

#12
Ok, here's a version I think is working. I haven't tested it on a site with sub-boards yet, so let me know how that goes. I'm sure we'll be tweaking this to make it the way you want. For now, I've made it look good in the default theme. There are a couple of options at the top of the code. One is to set a default board to load topics from when a person hits the page for the first time. The other setting is to limit how many recent topics you want to display on the page. It must be in a PHP type block. You can simply make the changes to the file, then upload it to the root of your SMF forum and call it in a block like this:
include('itch_recent.php');

If you don't want to do that, you should be able to copy/paste the code into a block and save it. I should also note that there is some CSS in the code that you can play with to change the display.

Let me know what you think or if you have any problems.

Bec

Thanks IchBin, will give it a go tomorrow and let you know how things go! Thanks again for your help with this :)

IchBin

Actually, I take that back. I don't think you'll be able to paste the code into a block because of the way the Ajax works. You'll need to upload the file to make it work properly.

dimdom

Hello, IchBin.

I have tried that but this is what I get...

TP 0.9 . 8  , 1.1.10

IchBin

Ah the menu breaks out of the block. I guess I need to test it on a board where there are enough boards to do that. If you select a board that has more topics, and the recent topics table is taller, does it push the block down far enough to make it look better?

dimdom

#17
At the left it shows all the categories and boards in forum. At the right it shows only two topics despite the fact that there are more that 100 in this board...

The only things I modified was in this part of the code:

/************* CONFIGURATION OPTIONS **************/

// Set the number of recent topics to display (default is 10)
$limit = 10;

// Default display of recent topics. Choose board to load by default when no board has been selected.
$theboard = (int) 18;

/************ END CONFIGURATION OPTIONS************/



And in error log it gives this error:

Quote8: Undefined variable: my
Ἀρχεá¿â€"ο: /home/site/forum/SMF/itch_recent.php
Line: 234

IchBin

Ah yes, I have fixed the my error. I changed variable names and didn't change my. :D

Fixed in the post above where I attached the file. However, the topics returned I'll have to play with for a bit. I don't quite understand how the query only grabs certain messages by activity just yet. But will post back when I have a fix.

Bec

Hi Ichbin,

I gave it a go and while it has great potential its not really what I am after... appearance wise it worked perfect for me only problem I had was if a forum had not been posted in recently, when clicked it would give an error message "Warning: Invalid argument supplied for foreach() in /home/buctai8/public_html/itch_recent.php on line 224"

I have managed to have a play around and have come up with something which is pretty close to what I want... instead of having the normal forum page I plan on having the landing page as the most recent topics and having a menu linked up to the side (as per the attached picture) looks pretty great so Im pretty excited with it!

Thanks heaps for taking the time trying to do this, it really is appreciated!!

This website is proudly hosted on Crocweb Cloud Website Hosting.