Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Plugins & Atahualpa »

CYC Plugin help


  #1  
Old Feb 17, 2009, 09:18 PM
Joe Bonner
 
8 posts · Feb 2009
Hi,

First, I'd like to say that the Atahualpa theme has been great to customize. I'm a novice at this kind of stuff, but it's been relatively easy so far.

My question concerns the Customize Your Community plugin, and how to customize it in Atahualpa.

According to the CYC author, I need to look for code in the single post template file:

Quote:
Look at your single post template file in your blog theme (usually single.php) and find every div tag that is opened (<div>) but not closed (</div>) before the following piece of code:

<?php the_content(); ?>
However, I can't find anything that contains that string. Any suggestions?

Thanks.

Joe
  #2  
Old Feb 18, 2009, 05:20 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
Everything is in index.php in Atahualpa 3

The body of a post or page is this code in index.php, around line 122-137
PHP Code:
        <!-- Post Body Copy -->                
        <div class="post-bodycopy clearfix">
        <?php if ((is_home() && $bfa_ata_excerpts_home == "Full Posts") OR 
        (
is_category() && $bfa_ata_excerpts_category == "Full Posts") OR 
        (
is_date() && $bfa_ata_excerpts_archive == "Full Posts") OR 
        (
is_tag() && $bfa_ata_excerpts_tag == "Full Posts") OR 
        (
is_search() && $bfa_ata_excerpts_search == "Full Posts") OR 
        (
is_author() && $bfa_ata_excerpts_author == "Full Posts") OR 
        
is_single() OR 
        
is_page() OR (is_home() AND !is_paged() AND $postcount <= $bfa_ata_full_posts_homepage) ) { 
            
$bfa_ata_more_tag_final str_replace("%post-title%"the_title(''''false), $bfa_ata_more_tag);
            
the_content(bfa_escape($bfa_ata_more_tag_final)); 
        } else { 
            
the_excerpt(); 
        } 
?>
        </div>
Put your code above or below that, and wrap it into a conditional statement to make it display on single post pages only:

PHP Code:
<?php if ( is_single() ) { ?>
YOUR CODE
<?php ?>
  #3  
Old Feb 18, 2009, 08:38 PM
nope
 
1 posts · Feb 2009
I have the same question on the same day. That is too funny. Great thing for this forum.

What I have found is that you shouldn't need to add anything in the boxes.
I did comment out lines 397-401 of cyc.php to get rid of the obvious errors.

Code:
//	if (function_exists('thesis_get_sidebars')) {
//		thesis_get_sidebars();
//	} else {
//		include(TEMPLATEPATH . '/sidebar.php');
//	}
Now I have a clean page with header and footer, but no sidebar.

I was able to get the sidebar to show up by adding
Code:
dynamic_sidebar(2);
to cyc.php but i could never get it in the right spot, and it wouldn't have the dashed separator/border that is normally there.

I also tried editing footer.php by adding
Code:
|| ($pagenow == "profile.php")
into line 56. The sidebar didn't show up but the dashed separator/border did, although it was a little messed up as well.

If there was an equivalent "get_sidebar()" command or sidebar.php file I don't think there would be a problem, but this theme is built a little differently. It would be great to have the theme and CYC plugin work together, but my beginner brain is out of ideas.
  #4  
Old Feb 19, 2009, 01:30 PM
Joe Bonner
 
8 posts · Feb 2009
@nope, thanks for the pointers. Hopefully Flynn can shed some light on the column issue.

Joe
  #5  
Old Feb 19, 2009, 05:18 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
Quote:
Originally Posted by Joe Bonner
@nope, thanks for the pointers. Hopefully Flynn can shed some light on the column issue.

Joe
Have you tried what I posted above?
  #6  
Old Feb 21, 2009, 08:17 AM
Joe Bonner
 
8 posts · Feb 2009
Flynn,

I'm having trouble figuring out where to post the code you provided. I've attached a screenshot of the CYC "admin" page, and here are the complete instructions:

Quote:
To customize the CYC plugin to work with your template, you’ll need to visit the administration panel at Settings > CYC. Once there, you’ll see three boxes you can insert code into:

* Box One: Code to insert after the header has been loaded
* Box Two: Code to insert before the sidebar is loaded
* Box Three: Code to insert after the sidebar has been loaded

Those familiar with Wordpress and CSS will likely have no problem figuring out what goes there. For those who are more “blogger” than “coder”, I’m going to explain how to find what to put in those boxes below:

Look at your single post template file in your blog theme (usually single.php) and find every div tag that is opened (<div>) but not closed (</div>) before the following piece of code:

<?php the_content(); ?>

After finding them, insert all of those div tags into Box One.

Next, look for the piece of code that calls for your sidebars. I use the Thesis theme, so mine is:

<?php thesis_get_sidebars(); ?>

But yours may look more like this:

<?php get_sidebar(); ?>

Once you find the sidebar code, look to see how many of the <div> tags you put into Box One are closed BEFORE the sidebar code appears and insert those div close tags (</div>) into Box Two.

Next, look to see how many of the <div> tags you put into Box One are closed AFTER the sidebar code appears and insert those div close tags (</div>) into Box Three.

Click “update settings” and you should be all set.
I appreciate your help with this.

Thanks!

Joe
Attached Thumbnails
Click image for larger version

Name:	Science Writers in New York › CYC Configuration — WordPress_1235225587589.jpg
Views:	965
Size:	8.0 KB
ID:	41  
  #7  
Old Feb 25, 2009, 02:10 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
Try leaving the first two boxes empty and add the whole contents of /atahualpa/footer.php into the third box.
  #8  
Old Feb 27, 2009, 02:47 AM
ostscom
 
1 posts · Feb 2009
Hi guys

Im doing the same thing with atahualpa and cyc, and i got an error message with the footer part, but i just created an empy sidebar.php file, and since ive got pages on the site, there is still a possibility for the user to navigate (instead of clicking back) if they would change their mind - voila!

/daniel
  #9  
Old Feb 27, 2009, 11:28 AM
Joe Bonner
 
8 posts · Feb 2009
Thanks. I'll give that a shot.

Joe

Quote:
Originally Posted by Flynn
Try leaving the first two boxes empty and add the whole contents of /atahualpa/footer.php into the third box.
  #10  
Old Mar 5, 2009, 04:02 PM
Joe Bonner
 
8 posts · Feb 2009
Quote:
Originally Posted by Flynn
Try leaving the first two boxes empty and add the whole contents of /atahualpa/footer.php into the third box.
I've since decided to remove the left column from the layout, and when I follow your instructions, I get the following in the right column:
Quote:
Appearance/Presentation -> Widgets -> Select \"Right Sidebar\" -> Click \"Show\" -> Click on \"Add\" on one of the widgets on the left side -> Click \"Save changes\" -> Done"; endif;?>
And this in the footer:

Quote:
Warning: include(/var/www/html/sw/swiny.org/wp-content/themes/atahualpa/sidebar.php) [function.include]: failed to open stream: No such file or directory in /var/www/html/sw/swiny.org/wp-content/plugins/customize-your-community/cyc.php on line 400

Warning: include() [function.include]: Failed opening '/var/www/html/sw/swiny.org/wp-content/themes/atahualpa/sidebar.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/html/sw/swiny.org/wp-content/plugins/customize-your-community/cyc.php on line 400
get('page_id'); $current_page_id = $wp_query->get_queried_object_id(); if ($bfa_ata_left_col_pages_exclude != "") { $pages_exlude_left = explode(",", str_replace(" ", "", $bfa_ata_left_col_pages_exclude)); if ( $bfa_ata_leftcol_on['page'] && !in_array($current_page_id, $pages_exlude_left) ) { $cols++; $left_col = "on"; } } else { if ( $bfa_ata_leftcol_on['page'] ) { $cols++; $left_col = "on"; } } if ($bfa_ata_right_col_pages_exclude != "") { $pages_exlude_right = explode(",", str_replace(" ", "", $bfa_ata_right_col_pages_exclude)); if ( $bfa_ata_rightcol_on['page'] && !in_array($current_page_id, $pages_exlude_right) ) { $cols++; $right_col = "on"; } } else { if ( $bfa_ata_rightcol_on['page'] ) { $cols++; $right_col = "on"; } } } elseif ( is_category() ) { $current_cat_id = get_query_var('cat'); if ($bfa_ata_left_col_cats_exclude != "") { $cats_exlude_left = explode(",", str_replace(" ", "", $bfa_ata_left_col_cats_exclude)); if ( $bfa_ata_leftcol_on['category'] && !in_array($current_cat_id, $cats_exlude_left) ) { $cols++; $left_col = "on"; } } else { if ( $bfa_ata_leftcol_on['category'] ) { $cols++; $left_col = "on"; } } if ($bfa_ata_right_col_cats_exclude != "") { $cats_exlude_right = explode(",", str_replace(" ", "", $bfa_ata_right_col_cats_exclude)); if ( $bfa_ata_rightcol_on['category'] && !in_array($current_cat_id, $cats_exlude_right) ) { $cols++; $right_col = "on"; } } else { if ( $bfa_ata_rightcol_on['category'] ) { $cols++; $right_col = "on"; } } } else { if ( (is_home() && $bfa_ata_leftcol_on['homepage']) || ( is_front_page() && $bfa_ata_leftcol_on['frontpage']) || ( is_single() && $bfa_ata_leftcol_on['single']) || ( is_date() && $bfa_ata_leftcol_on['date']) || ( is_tag() && $bfa_ata_leftcol_on['tag']) || ( is_search() && $bfa_ata_leftcol_on['search']) || ( is_author() && $bfa_ata_leftcol_on['author']) || ( is_404() && $bfa_ata_leftcol_on['404']) || ( is_attachment() && $bfa_ata_leftcol_on['attachment']) ) { $cols++; $left_col = "on"; } if ( (is_home() && $bfa_ata_rightcol_on['homepage']) || ( is_front_page() && $bfa_ata_rightcol_on['frontpage']) || ( is_single() && $bfa_ata_rightcol_on['single']) || ( is_date() && $bfa_ata_rightcol_on['date']) || ( is_tag() && $bfa_ata_rightcol_on['tag']) || ( is_search() && $bfa_ata_rightcol_on['search']) || ( is_author() && $bfa_ata_rightcol_on['author']) || ( is_404() && $bfa_ata_rightcol_on['404']) || ( is_attachment() && $bfa_ata_rightcol_on['attachment']) ) { $cols++; $right_col = "on"; } } ?> Appearance/Presentation -> Widgets -> Select \"Right Sidebar\" -> Click \"Show\" -> Click on \"Add\" on one of the widgets on the left side -> Click \"Save changes\" -> Done"; endif;?>

num_queries; ?>
Any ideas?

Thanks.
  #11  
Old Mar 5, 2009, 08:27 PM
Joe Bonner
 
8 posts · Feb 2009
Quote:
Originally Posted by ostscom
Hi guys

Im doing the same thing with atahualpa and cyc, and i got an error message with the footer part, but i just created an empy sidebar.php file, and since ive got pages on the site, there is still a possibility for the user to navigate (instead of clicking back) if they would change their mind - voila!

/daniel
Can you go into a little more detail on this? Thanks.
  #12  
Old Mar 9, 2009, 11:37 AM
amber
 
13 posts · Feb 2009
Okay, it now works on my site, and I'm super low tech, too. Here's what to do.
In the first box paste this:

<div class="main">
<div class="container">
<div class="content span-24">
<div class="posts span-17 last">
<div class="paddings">
<div class="navigation">
<div class="fl">
<div class="fr">

Second box paste:

</div>
</div>
</div>
</div>
</div>
</div>
</div>

Third box paste a couple more closed divs if you want though it didn't
seem to matter either way.

</div>
</div>

Now the way to check it is to log out of wordpress. That will take you to
a log out page that has your theme on it.

Cool.

It will also have an error. You've got to open up your cyc.php code, only not
inside wp, but in an editor. On my editor it said the error was on line 400.
Go there and erase

thesis_

right before get_sidebars

(this is in there twice, one right after another)

also erase the 's', making the word(s) sidebars, plural, into just sidebar, singular.

there you go.

Go back into wp, and try creating a user account in your cyc settings.

It works!
  #13  
Old Mar 19, 2009, 07:43 PM
Joe Bonner
 
8 posts · Feb 2009
amber:

Thanks. I gave that a go, but now I have the following error:

Quote:
Warning: include(/var/www/html/sw/swiny.org/wp-content/themes/atahualpa/sidebar.php) [function.include]: failed to open stream: No such file or directory in /var/www/html/sw/swiny.org/wp-content/plugins/customize-your-community/cyc.php on line 404

Warning: include() [function.include]: Failed opening '/var/www/html/sw/swiny.org/wp-content/themes/atahualpa/sidebar.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/html/sw/swiny.org/wp-content/plugins/customize-your-community/cyc.php on line 404
Any ideas? FWIW, I have the theme set up to have no sidebars on the main page.

Thanks!

Joe
  #14  
Old Jun 25, 2009, 04:25 PM
Chuck
 
1 posts · Jun 2009
Amber. Thank you so much for your solution to the "sidebar" issue. Even though I'm working with an Artisteer theme your solution fixed that problem for me. You saved me a bunch of time and effort and I appreciate it.

Bookmarks




All times are GMT -6. The time now is 07:09 AM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.