• Resolved martoccia

    (@martoccia)


    Hi,
    I just installed this great plugin. Everything is fine, but I’d like to customize the page on facebook. Editing the index.php in the plugin / theme folder I changed the content to the_exerpt, and looks better. But does anyone know how to put the first image of every post in the exerpt, and how to show only posts from specific categories?
    If you wanna chek my page out is here https://apps.facebook.com/sportbrain/

    ciao!

    M.

Viewing 6 replies - 16 through 21 (of 21 total)
  • Thread Starter martoccia

    (@martoccia)

    Thank you Brandon, you’re very gently. I know is not a must to answer and I really thank you for that.
    I’ll try with your new tips, the only thing is not very clear is if I must type all the path to the image here (list-style-image: url(all url here or just image name???); ) or just the image name and put it in the folder wpbook/theme/default

    You are doing a great job!

    Thread Starter martoccia

    (@martoccia)

    Ok, I tried your tips and works perfect in the app page. In the profile box not, I tried also steping back to the 1.1.1 version, but still have the doths bullets, maybe I think in recent-posts.php the stylesheet is not recalled… I put this in that file:

    <?php
    
    // need wordpress context to get 5 recent posts
    
    include_once('../../../../wp-blog-header.php');
    
    // also need some config here
    
    $wpbookOptions = get_option('wpbookAdminOptions');
    
    if (!empty($wpbookOptions)) {
    
    	foreach ($wpbookOptions as $key => $option)
    
    	$wpbookAdminOptions[$key] = $option;
    
    }
    
    $app_url = $wpbookAdminOptions['fb_app_url'];
    
    $app_name = $wpbookAdminOptions['fb_app_name']; 
    
      // get the application name from the wpbook settings. 
    
    ?>	
    
    <h3><a href="https://www.sportbrain.it/"><img border="0" img class="alignleft size-full wp-image-382" title="SportBrain.it" src="https://www.sportbrain.it/wp-content/plugins/wpbook/theme/sportbrain_piccolo.gif" alt="SportBrain.it" /></a></h3>
    
    <div class="wpbook_recent_posts">
    
    <ul class="apple">
    
    <?php echo wp_recent_posts(5); ?>
    
    </ul>
    
    </div>

    If you have any suggestion… I’ll be keen! (and obviously patience!!;)

    B.

    (@bandonrandon)

    Martoccia,

    One of the other developers handles the code for the profile box so I may ask him to take a look at styling the profile box. I believe this was handled by calling the “recent_post.php” file in versions prior to 1.2. However, with the 1.2 release it was moved to the config.php file that is contained inside the themes folder. I’m not sure if you can use custom styles in the profile box but you can try to call the stylesheet in the profile box then add the class of “apple” to the ul just like you did in the theme index.php file.

    You’re question about image location. I just told you to put in in the default folder for simplicity. The url path in the css need to be a RELATIVE path to the image. You may want to use a full url if you wish to style the profile box.

    Sorry I couldn’t be much help this just isn’t something that is commonly done.

    Thread Starter martoccia

    (@martoccia)

    Thank you very Much brandon, for your work on the plugin and for your help!
    I’ll close this post to makeit usefull to the others!

    Ciao!

    I read this post and am having the following problems customizing and finding the required files:

    1.First how do I add google ads to the app?

    2. martoccia said he edited the index.php file in plugin/theme (is this under ‘root/wp-content/plugins/wpbook/theme/index.php?

    if so, what line am I inserting ‘the_exerpt,’ so the app can show eccepts instead of the full article in the main page.

    3. Putting the first image of every post in the exerpt; which file and which line should I paste the code from BandonRandon?

    4. How do I increase the number of post that shows on the recent post area?

    @tuviere-

    1. The theme supplied with the plugin, which is used whenever the blog is viewed inside facebook, does not “out of the box” support google adwords, but you can add the required javascript wherever you link in the index.php inside /wp-content/plugins/wpbook/theme/

    2. Sounds good.

    3. Not sure as I don’t use that plugin – you’d need to identify what action or filter it affects and identify why it isn’t firing in this context

    4. You can edit the wp-recent-posts() and wp-profile-recent-posts() functions in wpbook.php or you can look through the code for where those functions are called, and change the number passed to the function.

    In a later version, I may make this number user configurable.

Viewing 6 replies - 16 through 21 (of 21 total)
  • The topic ‘wpbook page layout’ is closed to new replies.