Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Sidebars & Widgets (http://forum.bytesforall.com/forumdisplay.php?f=14)
-   -   Help needed with Now Reading plug in (http://forum.bytesforall.com/showthread.php?t=1086)

saipanyam Apr 3, 2009 01:22 PM

Help needed with Now Reading plug in
 
Now Reading plug in 4.4.3 works fine with atahualpa version 3.2.
But when I upgraded to 3.3.2 The library page has lost all styles, headers and footers. It appears as if it has no styling. When i switch back to 3.2 it works great. Any help provided is greatly appreciated. I think atahualpa theme rocks

Flynn Apr 4, 2009 06:20 PM

See if you've done everything the same way, for instance do you have a space in the theme directory now, such as /atahualpa 3/

Otherwise post a URL please

saipanyam Apr 4, 2009 08:10 PM

I have the theme directory set up as atahualpa332. No spaces.
Here is the URL:
www.iphigroup.com

The sidebar widget(Title: Reading list) looks fine. If you click the view library link and single book link, we get a page devoid of all styles.

library url
www.iphigroup.com/library

Thanks in advance

Flynn Apr 5, 2009 04:23 PM

Have you created page template for this, or are you using any of the single.php etc. files that came with the plugin?

The single.php, search.php, tag.php of the plugin should contain at the top what Atahualpa's index.php has at the top, the lines 1-72, everything above <?php get_header(); ?>

It probably worked in 3.2 because there Atahualpa had an get_option loop in footer.php and header.php and several other files, but that was wasteful and consuming resources, now all the options are fetched in index.php and passed to the other files from there, and if a file replaces index.php (which single.php, search.php and tag.php are doing) then this file needs to have this routine at the top of index.php lines 1-72 to get the options from the WP database, and figure out which sidebars to show

Try copying and pasting line 1-72 from Atahualpa's index.php into the plugin's single.php, search.php and tag.php and replace what those files have there, up to <?php get_header(); ?>

saipanyam Apr 6, 2009 12:36 PM

I tried doing what you suggested. I put lines 1-72 from index.php in Library.php, single.php which are the template files of the plug in. But now I get the contents of the left sidebar without any styles AND the library content. The whole page looks unformatted.

http://www.iphigroup.com/library

I suspect it is because of
1. missing style sheet link somewhere
2. Also with the fact that 'Library' is not a 'Page' that I have created in Wordpress, but set as an option in Now-reading options for displaying the library.

These are only my guess. I cannot figure out what changed between the versions that show this behavior

Regards
Sai

Flynn Apr 6, 2009 07:23 PM

It's not getting the theme options so all the CSS styles in the header section are empty. The upper part of index.php is where the options are fetched from the database. The get_option only works from within standard Wordpress page templates.

"pagename.php" in /atahualpa332/ should work so /atahualpa332/library.php should work if this is a page and "library" is the page slug.

To get the (CSS, sidebars etc.) options it would have to be a file in the themes root directory and with any of these file names

http://codex.wordpress.org/File:Template_Hierarchy.png

Otherwise the options would have to be grabbed straight from the database instead of going through standard WP functions.

saipanyam Apr 7, 2009 12:31 PM

Thanks for your reply Flynn.
I tried doing what you suggested. I put library.php in the theme directory and also made it a wp page.

I also tried putting in the library.php in a folder called now-reading UNDER atahualpa332 directory as the plug in author suggested. But no luck.

I still have the same problem.
My only option is to rollback to athahualpa 3.2 OR get rid of now-reading plug in!

I like both....

Regards
Sai

saipanyam Apr 7, 2009 12:46 PM

How do I grab the options from the database directly? I am new to PHP, but I am good in taking instructions. So if you can post the code for grabbing options from db directly. that will be awesome.
Thanks in advance

Taquoriaan Aug 19, 2009 08:17 PM

Take the library.php file, and paste the code above the <?php get_header() ?> part. So basically at the beginning of the file.

At the end of the file, edit out <?php get_sidebar() ?> to prevent the plugin putting your whole sidebar in the body text. That should fix it. Do this with all files except sidebar.php and it works again.

Go over to www.taquoriaan.com/library to see my result with it.

lbellemore Sep 10, 2009 03:35 PM

hi Guys,

I've also just tried installing Now Reading (v. 5.1.1.0) and am having the same problem with the sidebar missing. When I view my library, I have an error across the bottom of my page:

Warning: require_once(/home/mysite/public_html/blog/wp-content/themes/default/sidebar.php) [function.require-once]: failed to open stream: No such file or directory in /home/mysite/public_html/blog/wp-includes/theme.php on line 843

I am using Atahualpa v 3.4.2 and I have tried the instructions copying lines 1-72 from index.php. However, it looks like index.php has changed a lot since the last posting and only goes up to line 40. Can you provide some updated instructions on how to get this plugin working?

Many thanks
Len


All times are GMT -6. The time now is 06:49 PM.

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