1 boristhemoggy Jul 01, 2009 23:22
3 boristhemoggy Jul 02, 2009 17:39
Sorry, it's 2.4.7
Thanks for the help
4 tobw Jul 13, 2009 10:47
Sorry to be thick, here, but I want to do the same thing on my version of 2.4.7. I have got into index.php and am making the changes you mention, but what do you mean by the post's ID - is that to do with it's category, Internet address or neither?
Thanks in advance by the way.
5 yabba Jul 13, 2009 10:50
In admin, if you hover over the posts edit or publish or delete link you'll see the url read something like "........&p=####&.....' the #### is the ID of the post, just put that number in place of 123 ;)
¥
6 tobw Jul 13, 2009 13:55
No, I've found the number you mentioned, but when I try to alter the index.php file, I am told that the changes can't be saved because it is a read only file (despite the fact that "read only" wasn't ticked in "Properties" when I looked there).
7 yabba Jul 13, 2009 15:36
"where" tells you that it's read only?
¥
8 tobw Jul 13, 2009 18:24
I right clicked on "index.php" from the list of files extracted from the download, then went to "properties" and at the bottom of that screen there was a greyed out area which included the term "Read only" - the tick box was empty.
9 edb Jul 14, 2009 00:54
By default, b2evolution "locks" php files from being edited. MUCH better than unlocking that file type is to use an editor on your local computer, then upload the changed file.
10 yabba Jul 14, 2009 01:07
^-- what he said .... but far more concisely and encompassing :D
¥
11 tobw Jul 14, 2009 08:27
Morning both - nope, I used an editor like you said to amend the wording and then uploaded it to replace the existing file, but the page I want as my "home" page is still not showing.
I think I may have made a mistake in the way I worded things - the top of the index.php file now reads;
<?php
if( empty( $_GET ) && empty( $_POST ) )
{
$p = 28; //}
?>
Have I misinterpreted what you told me to do?
12 yabba Jul 14, 2009 19:51
Ok, the only mistake I can see with that code is the fact that you've commented out ( // ) the closing brace ( } ). It needs to read like this :
<?php
if( empty( $_GET ) && empty( $_POST ) )
{
$p = 28; // <-- this means "start of comment" so anything you put after it ( on the same line ) will be ignored ;)
}
?>
Could you possibly post a link to the blog that you're trying to get this working on ?
¥
13 tobw Jul 15, 2009 08:38
I've pasted in the text exactly as you worded it, but it's still not working.
My blog is at
http://ezelesek.com/b2evolution/blog1.php
I am trying to get what I have done under the category "welcome" to be what appears at the top of the blog every time someone logs on.
14 edb Jul 16, 2009 03:25
@¥åßßå: could this not be accomplished by setting the blog URL for the default blog on index to be the post's permalink page? Untested - just thinking. Thinking that if _GET and _POST have *anything* then the condition is not met so the if is bypassed.
Hey wait a minute. Maybe index.php isn't the right place for that. The thing is the URL posted goes to blog1.php which is a stub file, which I'm pretty sure means index.php is not even called. Not that going directly to index.php does any different so that's not on track to a solution.
Perhaps that snippet of code needs to go into /skins/yourskin/index.main.php (and maybe posts.main.php if it exists)? You might have to precede it with global $_GET, $_POST; meaning like this:
<?php
global $_GET, $_POST;
if( empty( $_GET ) && empty( $_POST ) )
{
$p = 28; // <-- this means "start of a single line of comment" ;)
}
?>
15 tobw Jul 16, 2009 08:01
Thanks Ed, I'll give that a go today.
The "static" pages in evo settings aren't what you think and have been removed from 3.x and replaced with caching.
Without knowing your evo version it's a smidge hard to provide the best solution, but this should work
1) create a post that you wish to be your intro page
2) make a note of the posts ID and then crack open index.php || stub.php ( depending on which you use ) and add the following to the very top of the file :
¥