Recent Topics

1 Feb 17, 2005 04:00    

yes, I have to annoy you guys with newbie questions, but I am seriously clueless. I've searched the forum for help, but I'm still not understanding this...
Where do I stick my blogroll and blogsnob code? I tried to stick stuff under

<!-- =================================== START OF SIDEBAR =================================== -->
<div class="bSideBar">


but I guess I'm not doing this right.

also, I'm currently using the originalb2 skin. Is there any way I can show the the links in my linkblog on the first page? I'm not good at editing the templates, and I don't want to mess anything up.

2 Feb 17, 2005 14:56

Ok, don't be too intimidated by this - it's pretty easy once you have a system :D

I find that trawling through your _main.php file once you have put blogrolls, rings, button, bells and whistles into it - ultra confusing.

So here is a way to put 'stuff' in but still be able to find your way around.

Create a new file in notepad (or whatever you use - notepad is good though) and paste your blogroll/blogsnob code into it. Now name it - eg. blogroll.php

Now open _main.php and scroll down till you find this

<div id="menu">

<p><?php $Blog->disp( 'longdesc', 'htmlbody' ); ?></p>

<h4>categories:</h4>
<form action="<?php $Blog->disp( 'blogurl', 'raw' ) ?>" method="get">
<?php	require( dirname(__FILE__).'/_categories.php' ); ?>
<input type="submit" value="<?php echo T_('Get selection') ?>" />
</form>


<h4>search:</h4>

<form name="searchform" method=

Now we are going to put your blogroll/snob between categories and search - but you can put it somewhere else once you get the hang of it.

Just above

<h4>Search</h4>

place this bit of code


<h4>Blogroll and other bloginess</h4>
<?php	require( dirname(__FILE__).'/blogroll.php' ); ?>

This should place all of the code in the blogroll.php into your sidebar - then when you want to edit the blogroll/snob code you edit blogroll.php.

If it doesn't look right in the sidebar - have a look how the other items are set up codewise and copy that format -

You can do this with any other custom bits for the sidebar that you like.

<ul><li>blah...</li></ul> etc..

Did that make sense.... :lol:

3 Feb 19, 2005 18:54

i can't find that in my _main.php, but here' s something i think is similar:

<div class="bSideItem">
		<h3 class="sideItemTitle"><?php echo T_('Search') ?></h3>
		<?php form_formstart( $Blog->dget( 'blogurl', 'raw' ), 'search', 'SearchForm' ) ?>
			<p><input type="text" name="s" size="30" value="<?php echo htmlspecialchars(

$s) ?>" class="SearchField" /><br />
			<input type="radio" name="sentence" value="AND" id="sentAND" <?php if( 

$sentence=='AND' ) echo 'checked="checked" ' ?>/><label for="sentAND"><?php echo T_('All Words') ?></

label><br />
			<input type="radio" name="sentence" value="OR" id="sentOR" <?php if( 

$sentence=='OR' ) echo 'checked="checked" ' ?>/><label for="sentOR"><?php echo T_('Some Word') ?></

label><br />
			<input type="radio" name="sentence" value="sentence" id="sentence" <?php if( 

$sentence=='sentence' ) echo 'checked="checked" ' ?>/><label for="sentence"><?php echo T_('Entire phrase') 

?></label></p>
			<input type="submit" name="submit" class="submit" value="<?php echo T_(

'Search') ?>" />
		</form>
	</div>

	<div class="bSideItem">
		<h3><?php echo T_('Categories') ?></h3>
		<?php form_formstart( $Blog->dget( 'blogurl', 'raw' ) ) ?>
		<?php // -------------------------- CATEGORIES INCLUDED HERE -----------------------------
			require( dirname(__FILE__).'/_categories.php' );
			// -------------------------------- END OF CATEGORIES ---------------------------------- 

?>

does it go somewhere there? Or am I just looking in the wrong place? :oops:

4 Feb 20, 2005 01:00

Yep you got it - so change it to something like this...

sarah wrote:


	<div class="bSideItem">
		<h3><?php echo T_('Categories') ?></h3>
		<?php form_formstart( $Blog->dget( 'blogurl', 'raw' ) ) ?>
		<?php // -------------------------- CATEGORIES INCLUDED HERE -----------------------------
			require( dirname(__FILE__).'/_categories.php' );
			// -------------------------------- END OF CATEGORIES ---------------------------------- 

?>
</div>
<div class="bSideItem">
      <h3>Blogroll and other bloginess</h3>
<?php   require( dirname(__FILE__).'/blogroll.php' ); ?>
</div>

You might need to have a look at it and tweak at it a bit - but you have the right place. The key is to look at the sections of code and see how they are displaying on your page - once you can recognise which bit does what you can do most things....

Remember to make sure that divs are closed at the end of each bit you add...

Let me know if you crack it - and if you get confused just post and we'll get you going in the right direction :D

6 Feb 20, 2005 04:16

You need to edit the _main.php in the originalb2 folder - I am guessing that you altered the custon _main but not the other... each skin folder has it's own unique _main.php and will only display your customisations if you alter it. :D did that help?

7 Feb 20, 2005 07:16

how do I do that? I tried to edit it in frontpage and notepad, and it just says "Please, do not access this page directly."

8 Feb 20, 2005 13:21

Are you sure you're doing this on a local file? php is parsed on the server, so if you try to just pull up your _main.php in your browser, it will say that. Open up the local copy of the file (if it was a fantastico install, download a copy of the zip), and you should be away.

9 Feb 21, 2005 06:59

omg, it finally works after I did some renaming :D :D :D! Thanks so much sunset for all your help, and also thanks to Graham for that little hint!

11 Mar 20, 2005 21:38

I'm still trying to get my head wrapped around this...
If I understand the above posts correctly I should be able to create "paypal.php" in kubric folder and modify main.php to display the button in the side bar? I guess you do all sidebar stuff this way?

A learning curve is one thing, but this guy is vertical.


Form is loading...