I want to make a duplicate of the baord index, but I'm not sure how. I looked at how to make a new page "within" the SMF system using ssi.php, but I straight up want to have a second index page (it's going to have some slight variations) and I'm thinking that using the ssi.php method is going to be kind of backwards when what I want is a duplicate of a current page. Is there a way to do this? Somewhere in the site that defines pages and how to modify that. Or is that a really terrible idea?
I don't understand why you need to duplicate the board index at all... why have two pages that do basically the same thing?
Because I like wasting time for no particular reason. ::)
The reason I want to do it is that I want to have some minor modifications that I don't want on the board index. People coming to it from another route will get the second board index. But it is similar enough that recreating a new page will be a lot of wasted effort.
Additionally I figure this will give me a better understanding of how the SMF system works with regards to page generation.
Well, the Board Index is called from "index.php" when there is no "action" defined. Here:
elseif (empty($_REQUEST['action']))
{
// Action and board are both empty... BoardIndex!
if (empty($board) && empty($topic))
{
require_once($sourcedir . '/BoardIndex.php');
return 'BoardIndex';
}
Lainaus käyttäjältä: aquagrrl - lokakuu 08, 2013, 05:26:25 AP
Because I like wasting time for no particular reason. ::)
No need for sarcasm :P The better we understand what you want to do, the better we can help you ;)
so - instead of just using conditionals to make things appear (or not) on the boardindex page, you plan to recreate the whole thing for those minor conditional displays??
That doesn't make logical or programatic sense...
I apologize for the snark; it was over the top. But the first message wasn't helpful; and I would think it's fair to assume that if I wanted to do it I had a reason not because I like making duplicate pages for fun. Asking why would have been different.
Lainaus käyttäjältä: Kindred - lokakuu 08, 2013, 12:33:30 IP
so - instead of just using conditionals to make things appear (or not) on the boardindex page, you plan to recreate the whole thing for those minor conditional displays??
That doesn't make logical or programatic sense...
Yup.
It doesn't make sense to you because you don't know what I'm doing or why. I'm not intentionally being dodgy here, I just don't know that I need to explain the reason to what I want to do if it has no bearing on the question.
Plus, as I mentioned the second motivation: learnin'.
Margarett, thank you for answering the question. It was very helpful. Even with the well deserved smack down.
Well, unless you explain what your actual goal is, we can't really help you.
What you are doing is pointless and a waste of resources and logic. What you have desribed so far can be better and more easily done by using conditionals in the existing boardindex and index templates.
It will also be more efficient in terms of resource usage and coding
Seriously, why not explain what you want and allow us to help yu do it right? especially if you are trying to learn? Because learning the WRONG way to do things is worse than not doing it at all.
One of the first things that you should learn is that just because you assume that you know "the best" way to do something, does not man that you do... And you should listen to folks who have more knowledge when they suggest that your way is probably not a great idea.
Lainaus käyttäjältä: Kindred - lokakuu 12, 2013, 08:01:45 IP
Well, unless you explain what your actual goal is, we can't really help you.
Except, margarett did.
I appreciate your concern, but it's all good. I have a very specific need in mind, and I have the answer I need.
Lainaus käyttäjältä: Kindred - lokakuu 12, 2013, 08:01:45 IP
Well, unless you explain what your actual goal is, we can't really help you.
Depending on the situation you may be able:
1) not to answer a question at all (if you don't have enough data),
2) not to give the best way to solve the issue,
3) give the best possible answer.
I agree that 3 is what we usually should aim for, though, if there are not enough info, but there is possible way to solve the issue, it may be worth to just give that "provided there may be a better way to do what you want to do". I see nothing too wrong in this.