1 spasmface Aug 15, 2005 18:14
3 spasmface Aug 16, 2005 02:02
yes thats more or less correct:
http://www.lungshrimp.com
and the page i want it to look like is
http://lungshrimp.com/index.php?p=23&more=1&c=1&tb=1&pb=1
and yes my backoffice is setup like that, the skin is currently modified version of clean, im changing it as i get used to b2evolution.
I dont mind getting my fingers dirty with hackin it up
thanks for the timely reply!
-----------
My webpage goes blank if i add /conf/hacks.php with the code for some reason... , ive deleted for now. i got the code from
http://forums.b2evolution.net/viewtopic.php?t=4804&highlight=previous+entries
<?php
function posts_nav_link_number($before='', $after='', $pagelink='%', $pagedgroup='5', $page='')
{
global $MainList, $paged, $result, $request, $posts_per_page, $what_to_show;
$p = $MainList->$p;
if( empty($p) && ($what_to_show == 'paged') && isset($MainList) )
{
$max_page = $MainList->get_max_paged();
if( $max_page > 1 )
{
echo $before;
$saved_paged = $paged;
if(!$paged) $paged=1;
$curr_paged = $paged;//find the $pagedgroup that we're in
for($j=0; ($j*$pagedgroup) < $paged; $j++);
$i=$j-1;
//echo "\$i=$i; \$j=$j; \$k=$k; \$max_page=$max_page;";
if($i > 0) {
// echo '<a href="';
// echo regenerate_url( 'paged', 'paged='.'1',$page);
// echo '">'.str_replace('%','1',$pagelink).'</a> ';
echo '<a href="';
echo regenerate_url( 'paged', 'paged='.($i*$pagedgroup),$page);
echo '">«</a> ';
}
//echo "\$i=$i; \$j=$j; \$k=;$k; ";
for( $k=($i * $pagedgroup) + 1; ($k <= ($j * $pagedgroup) ) && $k <= $max_page; $k++) {
if($k != $paged) {
echo '<a href="';
echo regenerate_url( 'paged', 'paged='.$k,$page);
echo '">';
}
echo str_replace('%',$k,$pagelink);
if($paged != $k) echo '</a> '; else echo ' ';
//echo "\$i=$i; \$j=$j; \$k=$k; ";
}
//echo "\$i=$i; \$j=$j; \$k=$k; ";
if ( $k <= $max_page)
{
//echo "\$i=$i; \$j=$j; \$k=$k; ";
echo '<a href="';
echo regenerate_url( 'paged', 'paged=' . $k ,$page);
echo '">»</a> ';
// echo '<a href="';
// echo regenerate_url( 'paged', 'paged='. $max_page, $page);
// echo '">'.str_replace('%',$max_page,$pagelink).'</a>';
}
}
$paged=$saved_paged;
echo $after;
}
}
?>
4 edb Aug 16, 2005 02:38
First thing is you really should upgrade to version 0.9.0.12 and add the xml-rpc patch. Your source code showed that you are using version 0.9.0.10, so I'm going to assume you also don't have the previous security patch. Evil spirited hackers know about the vulnerabilities and (I'm sure) will seek out available targets.
Second, doing what you want is a bit easier than it was to remove the linkback to b2evolution. Sorry, but that kinda annoys me: using free software, removing the linkback, then asking for help in the forums. Maybe someone else will help you out.
5 spasmface Aug 16, 2005 07:57
the linkback?? wtf is that?:oops:
ive had a friend set this up while i was working
and now hes busy with clients
sorry i not sure what ive done wrong?
in the meantime i will get the patch
Just called him up, he removed the skin author and linkback as long with validators, i will fix template, sorry about that =/
6 edb Aug 16, 2005 08:47
The link back to b2evolution saying "powered by b2evolution". In the [url=http://skins.b2evolution.net/a.php?skin=clean]clean skin[/url] it was on the very bottom of the page where it said it was valid xhtml: css: rss: atom and created by keoshi and powered by b2evolution. When you removed the entire footer you removed the only place your blog said "b2evolution wrote the program I use and keoshi built the skin I started with".
As to the conf/hacks.php file: I never noticed Isaac's hack before, but I've seen exactly what you describe. You do something in conf/hacks.php and *poof* the whole blog dies. You get a totally blank page and nothing else. My reaction has always been like yours: *uh-oh* and remove the most recent change. Often times it turns out to be duplicating a function name, but other times it's something really wierd that takes a fair amount of troubleshooting to identify. Sorry if I seem like a punk about it, but gee wiz the links to the skin author and b2evolution were there and it's a teeny tiny thing to leave intact so both parties get a nickel of credit for the work they did.
I can't help you on Isaac's hack. All I can think of is something personman already said in that thread: you start you hacks.php file with a "<?php " and end it with a "?>". Also, no blank spaces or return or anything after the last line. I can't say for sure that this issue would cause your blog to go blank because *anything* wrong in that file will cause the same end result.
Hey it's late for me. Hopefully removal of the credit links was an oversight because this hack is kinda neat to me. I try not to be a weener, and I sort of enjoy doing hacks I'll never use, but like I said about giving credit where it's due and all...
I see you are doing the upgrade right now. Cool. Your server will love you long time for that. Don't forget to delete the install folder when you are done!
MY MOUSE IS DYING!
7 spasmface Aug 16, 2005 09:19
yah i am, it broke tho cause my net keeps dropping out, i totally agree, credits due where credits due.
i just fixed the template, it seems to be screwing around =/
8 spasmface Aug 16, 2005 09:53
wheee its all fixed! sorry to hear about your mouse :(
well not all fixed but thanks, sorry!
9 edb Aug 16, 2005 17:20
I woke up and thought why does it matter to me? I publish lots of hacks and I have no idea if people using them do the linkback thing or not, but I'm glad you chose to put it back in.
Okay open up your _main.php file and look for something like this:
locale_temp_switch( $Item->locale ); // Temporarily switch to post locale
$MainList->date_if_changed(); // display post date if it changed
$more = $c= $tb = $pb = 1; // Here's the hack!
$Item->anchor(); // Anchor for permalinks
Then add the line that says it's the hack. BTW this assumes you have comments and trackbacks and pingbacks turned on in your back office. I figure you do because the URL you wanted it to look like has that string at the end of it. I don't know what will happen if you turn off any of those items. Might be no problem, but I didn't experiment with the hack that much - just plugged it into my blog and got the desired result. If you turn off any of those three and your blog acts wierd just remove the appropriate little bit from this hack. Like if you turn off pingbacks then remove the "$pb = " part.
Blue Skies, EdB
10 spasmface Aug 17, 2005 02:06
wow thanks, is there a place where i can read up on the $more var?
oh btw check out my linkback ;)
thanks very much!
So... you want your blog to act like a permalink page for the most recent post? I think it can be done but it'll take some hacking. Where is your blog now? Got link? What skin? Is your back office set up to display only one post per page? I forget what the option is called but it's probably on the settings tab and defaults to 5.