Advertisement:

Author Topic: just show topics?  (Read 4596 times)

Offline bulletflame

  • Semi-Newbie
  • *
  • Posts: 48
just show topics?
« on: February 22, 2011, 12:25:23 AM »
is there a way to remove the category and boards and just show topics in the main page?

i made a picture with paint i want somethin like that here is only shows the post ,, no categories,, no boards

Offline eyo

  • Jr. Member
  • **
  • Posts: 202
  • Gender: Male
Re: just show topics?
« Reply #1 on: February 22, 2011, 01:17:42 AM »
this would be great. ive always been curious how to do this - i tried redirection but redirection rarely works out well :(

Offline bulletflame

  • Semi-Newbie
  • *
  • Posts: 48
Re: just show topics?
« Reply #2 on: February 22, 2011, 08:47:46 AM »
anyone can help us???????? :'(

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,823
    • StoryBB/StoryBB on GitHub
Re: just show topics?
« Reply #3 on: February 22, 2011, 08:50:41 AM »
Once, just once, I'd love people to read the big sticky in this board that suggests a few things people can do in order to get help. Including being *specific* (I mean, do you only have the one board?) and what version of SMF.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline bulletflame

  • Semi-Newbie
  • *
  • Posts: 48
Re: just show topics?
« Reply #4 on: February 22, 2011, 08:52:40 AM »
version 1.1.12 n i want it like the picture i made

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,823
    • StoryBB/StoryBB on GitHub
Re: just show topics?
« Reply #5 on: February 22, 2011, 08:55:14 AM »
And until you actually bother to answer the question I asked you, there is no way on Earth I can or will help you.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline bulletflame

  • Semi-Newbie
  • *
  • Posts: 48
Re: just show topics?
« Reply #6 on: February 22, 2011, 08:58:16 AM »
i want to eliminate the categories and boards and just display the topics on the index page

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,823
    • StoryBB/StoryBB on GitHub
Re: just show topics?
« Reply #7 on: February 22, 2011, 08:58:48 AM »
For the third and final time of asking, HOW MANY BOARDS DO YOU HAVE?!
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline bulletflame

  • Semi-Newbie
  • *
  • Posts: 48
Re: just show topics?
« Reply #8 on: February 22, 2011, 09:07:07 AM »
ONE

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,823
    • StoryBB/StoryBB on GitHub
Re: just show topics?
« Reply #9 on: February 22, 2011, 09:09:13 AM »
Thank you, that's all you had to say before, when I first asked.

Now for another hard question, what's the link to that board *right now*? I need to know these things so I can give you the right code, I'm not asking just to waste your (and my) time.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline bulletflame

  • Semi-Newbie
  • *
  • Posts: 48
Re: just show topics?
« Reply #10 on: February 22, 2011, 09:15:39 AM »

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,823
    • StoryBB/StoryBB on GitHub
Re: just show topics?
« Reply #11 on: February 22, 2011, 09:19:35 AM »
Right, so you have two boards despite telling me you only had one.

Before I lose the last vestiges of sanity, which one is it supposed to go into, and will the other one need to be available afterwards? Or are you going to get rid of one, and if so which one (because I need to know the board's id number, either 1 or 2)
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline bulletflame

  • Semi-Newbie
  • *
  • Posts: 48
Re: just show topics?
« Reply #12 on: February 22, 2011, 09:23:02 AM »
i aliminated one the movies the first one i eliminated

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,823
    • StoryBB/StoryBB on GitHub
Re: just show topics?
« Reply #13 on: February 22, 2011, 09:25:54 AM »
So it's board 1. Hooray, what could have been 4 posts became 10.

Find your top level index.php file.

Code: (find) [Select]
// Fall through to the board index then...
require_once($sourcedir . '/BoardIndex.php');
return 'BoardIndex';

Code: (replace) [Select]
// Fall through to the board index then...
$board = 1;
require_once($sourcedir . '/MessageIndex.php');
return 'MessageIndex';
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline eyo

  • Jr. Member
  • **
  • Posts: 202
  • Gender: Male
Re: just show topics?
« Reply #14 on: February 22, 2011, 09:30:11 AM »
thanks arantor. i didnt bother asking anymore since you were already pissed off  8) thanks for the help

Offline bulletflame

  • Semi-Newbie
  • *
  • Posts: 48
Re: just show topics?
« Reply #15 on: February 22, 2011, 09:33:41 AM »
thanks!

Offline bulletflame

  • Semi-Newbie
  • *
  • Posts: 48
Re: just show topics?
« Reply #16 on: February 22, 2011, 09:40:16 AM »
didnt work for me

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,823
    • StoryBB/StoryBB on GitHub
Re: just show topics?
« Reply #17 on: February 22, 2011, 09:44:24 AM »
thanks arantor. i didnt bother asking anymore since you were already pissed off  8) thanks for the help

I only get pissed when I have to ask the same question multiple times.

didnt work for me

As a guide 'didn't work' is about as unuseful as it gets in terms of describing the problem. Fortunately I know what the problem is, I forgot something.

Also replace:

Code: [Select]
// Action and board are both empty... BoardIndex!
if (empty($board) && empty($topic))
{
require_once($sourcedir . '/BoardIndex.php');
return 'BoardIndex';
}

with

Code: [Select]
// Action and board are both empty... BoardIndex!
if (empty($board) && empty($topic))
{
$board = 1;
require_once($sourcedir . '/MessageIndex.php');
return 'MessageIndex';
}
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline bulletflame

  • Semi-Newbie
  • *
  • Posts: 48
Re: just show topics?
« Reply #18 on: February 22, 2011, 09:52:30 AM »
great it works thank you very much

Offline bulletflame

  • Semi-Newbie
  • *
  • Posts: 48
Re: just show topics?
« Reply #19 on: February 23, 2011, 03:57:29 AM »
when i try to post new topic it gives me an error has occurred message "The board you specified doesn't exist"

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,823
    • StoryBB/StoryBB on GitHub
Re: just show topics?
« Reply #20 on: February 23, 2011, 07:30:18 AM »
Before or after you write the message?
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline bulletflame

  • Semi-Newbie
  • *
  • Posts: 48
Re: just show topics?
« Reply #21 on: February 24, 2011, 12:05:01 AM »
before writting the message, after i click on "new topic option" n i noticed the url is

http://xxx.bulletflame.com/index.php?action=post;board=.0

there is no .0 board and when i put =1.0 it works but the topics dont show in the index page

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,823
    • StoryBB/StoryBB on GitHub
Re: just show topics?
« Reply #22 on: February 24, 2011, 08:18:11 AM »
Yay for SMF 1.1 being more complex than I remember.

Remove the change you added from this thread.

Find this code in index.php:
Code: [Select]
// Load the current board's information.
loadBoard();

Before that, add:
Code: [Select]
// If we would go to the board index, let's make sure we actually find ourselves going inside the board instead.
if (empty($_REQUEST['action']))
$board = 1;
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline bulletflame

  • Semi-Newbie
  • *
  • Posts: 48
Re: just show topics?
« Reply #23 on: February 24, 2011, 08:59:33 AM »
works perfect thank you how u learned all this codes?

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,823
    • StoryBB/StoryBB on GitHub
Re: just show topics?
« Reply #24 on: February 24, 2011, 09:00:25 AM »
I started learning the PHP language 8 years ago, as for knowing SMF, mostly just looking at the code and understanding it (having learned PHP)
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline bulletflame

  • Semi-Newbie
  • *
  • Posts: 48
Re: just show topics?
« Reply #25 on: February 24, 2011, 09:18:48 AM »
cool, and can u help me with this other problem , take a look at the picture i want to hide it or change it

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,823
    • StoryBB/StoryBB on GitHub
Re: just show topics?
« Reply #26 on: February 24, 2011, 09:20:57 AM »
Remove this from Load.php:
Code: [Select]
// Build up the linktree.
$context['linktree'] = array_merge(
$context['linktree'],
array(array(
'url' => $scripturl . '#' . $board_info['cat']['id'],
'name' => $board_info['cat']['name']
)),
array_reverse($board_info['parent_boards']),
array(array(
'url' => $scripturl . '?board=' . $board . '.0',
'name' => $board_info['name']
))
);
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline bulletflame

  • Semi-Newbie
  • *
  • Posts: 48
Re: just show topics?
« Reply #27 on: February 24, 2011, 09:27:15 AM »
i cant find no load.php file on my directory

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,823
    • StoryBB/StoryBB on GitHub
Re: just show topics?
« Reply #28 on: February 24, 2011, 09:29:04 AM »
It's in Sources/
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline bulletflame

  • Semi-Newbie
  • *
  • Posts: 48
Re: just show topics?
« Reply #29 on: February 24, 2011, 09:33:49 AM »
okay it works and how do i change the page title?

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,823
    • StoryBB/StoryBB on GitHub
Re: just show topics?
« Reply #30 on: February 24, 2011, 09:35:45 AM »
Sources/MessageIndex.php

Code: [Select]
// 'Print' the header and board info.
$context['page_title'] = strip_tags($board_info['name']);

Presuming you want it changed to the forum name?
Code: [Select]
// 'Print' the header and board info.
$context['page_title'] = $GLOBALS['mbname'];
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline bulletflame

  • Semi-Newbie
  • *
  • Posts: 48
Re: just show topics?
« Reply #31 on: February 24, 2011, 09:44:46 AM »
man ur the best thank you for all ur help

Offline bulletflame

  • Semi-Newbie
  • *
  • Posts: 48
Re: just show topics?
« Reply #32 on: February 24, 2011, 11:19:05 PM »
hey its me again, i want to know how to display the table where it tells you the number of post n members also shows u guest or members online take a look at my forum it doesnt have it

http://xxx.bulletflame.com

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,823
    • StoryBB/StoryBB on GitHub
Re: just show topics?
« Reply #33 on: February 25, 2011, 03:29:53 AM »
You'll have to move a large chunk of code from BoardIndex.php to MessageIndex.php and a large chunk from BoardIndex.template.php to MessageIndex.template.php. If I get time I'll document it here later.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline bulletflame

  • Semi-Newbie
  • *
  • Posts: 48
Re: just show topics?
« Reply #34 on: February 25, 2011, 09:01:08 AM »
ok thank you

Offline eyo

  • Jr. Member
  • **
  • Posts: 202
  • Gender: Male
Re: just show topics?
« Reply #35 on: March 10, 2011, 10:53:20 PM »
how do i show topics if i use rc4? i use only 1 category and its pretty useless to see 1 category and would just like to see the topics instead

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,823
    • StoryBB/StoryBB on GitHub
Re: just show topics?
« Reply #36 on: March 11, 2011, 02:53:31 AM »
The same code should actually work.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline eyo

  • Jr. Member
  • **
  • Posts: 202
  • Gender: Male
Re: just show topics?
« Reply #37 on: March 11, 2011, 07:37:06 PM »
ok thanks. will try it