Announcement

Collapse
No announcement yet.

sidebar php problems ... ???

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • alessio
    replied
    format with html tags the needed content inside the test_include.php file and it should returned formatted when included in the sidebar in this way.

    P.s at w3it.org the sidebar is included/done in different way, not using the default vB sidebar.

    Leave a comment:


  • DanGarion
    replied
    How would I go about formating the text in the block if I'm pulling it from PHP? If I'm using this command?

    Originally posted by alessio View Post
    PHP Code:
    ob_start();
       include
    './includes/test_include.php';
       
    $output ob_get_contents();
    ob_end_clean();
    return 
    $output

    Leave a comment:


  • alessio
    replied
    what do you mean? About the icon i think are speaking of favicon.ico the icon that appear on top os many sites.
    You need to create a .ico image 16X16 pixels in size that need to be upload into your web space root.
    It should so appear in auto on all browser that support it.
    If you like to put the icon.ico in a different folder than root than you need to add this code in your head section of the page (but it is not comfortable!):
    <link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon" />

    p.s about title question, i have not well understand: by the way the new vB version 4 > add features about seo tips implemented sufficiently well, there is already all the necessary, and maybe you need only to remove something redundant instead ... do oyu use a previous version of vB 4?

    Leave a comment:


  • BRotondi
    replied
    Thanks for these tips!

    Is there also a variable for the title? Or how do I get an icon or phrase into the title?

    Leave a comment:


  • alessio
    replied
    html isn't rendered in the output for the included file

    also code like this work, if contained in the included text_include.php file:
    PHP Code:
    <?php
    echo"<h1>test this out</h1>";
    ?>
    but the html isn't correctly returned. It return pure text.
    Last edited by alessio; Thu 4 Mar '10, 1:36pm.

    Leave a comment:


  • alessio
    replied
    include on blocks

    PHP Code:
    ob_start();
       include
    './includes/test_include.php';
       
    $output ob_get_contents();
    ob_end_clean();
    return 
    $output
    Last edited by alessio; Fri 5 Mar '10, 7:14am.

    Leave a comment:


  • alessio
    replied
    return $output

    this work ... i had already see before but it, but had not work, i don't know for what reason, while now all "return" as needed.
    Thank you!

    Leave a comment:


  • Lynne
    replied
    You do not use echo in the php block. If you look at the template that will output the data, you'll see that it is looking for the variable $output. So, assign all your output to that variable:
    PHP Code:
    $output 'hello world!';
    return 
    $output

    Leave a comment:


  • alessio
    replied
    it seem to not work correctly, also to me. Any fix is possible to this?

    Leave a comment:


  • alanshort
    replied
    thanks borbole... i thought i was going crazy !!

    Is this is a bug, please could someone test too....

    Leave a comment:


  • borbole
    replied
    Indeed. It does that to me as well. It might be some type of bug unless we are missing something.

    Leave a comment:


  • alanshort
    replied
    Forums & Moderators | Forum Blocks Manager | Add Block

    Block type : ~~vbblock.blocktype_html~~

    Content type : php

    Leave a comment:


  • borbole
    replied
    From where are you trying to create it?

    Leave a comment:


  • alanshort
    started a topic [Forum] sidebar php problems ... ???

    sidebar php problems ... ???

    Hey All

    I'm trying to create a custom sidebar block in my forum.

    the text and html options work fine, however when trying to use the php option, it displays the text at the very top of the page and not in the sidebar ... ?

    i.e

    if i create a new php block containing :

    echo "hello world!";

    then this is displayed at the very top of the page and not in the side bar....

    What am i doing wrong ???

    Cheers
    A

Related Topics

Collapse

Working...
X