1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Show picture attachments when rendering a post outside the forum?

Discussion in 'XenForo Development Discussions' started by Member 3639, Dec 10, 2010.

  1. Member 3639

    Member 3639 Active Member

    Is it possible to get attachment images inserted as full images into a post properly displayed outside the forum?

    As right now the renderer just creates a link to it if it can't find the image, is there a way when using the renderer to set the path again?

    This is how i setup the bbcode rendering:
    PHP:
    $startTime microtime(true); 
     
    $xenforoRoot '/home/prxainf1/public_html/gamingonlinux.info/chill'
    require(
    $xenforoRoot'/library/XenForo/Autoloader.php'); 
    XenForo_Autoloader::getInstance()->setupAutoloader($xenforoRoot '/library'); 
     
    GeekPoint_Symfony::initializeXenforo($xenforoRoot$startTime); 
    $visitor XenForo_Visitor::getInstance();  
     
    $formatter XenForo_BbCode_Formatter_Base::create(); 
    $parser = new XenForo_BbCode_Parser($formatter);
    Also is the same possible for smilies as right then they get rendered as missing images, either a way to keep them as text or actually show the right smilies.
     
  2. Member 3639

    Member 3639 Active Member

    Bump, sorry but need to get this sorted.
     
  3. Member 3639

    Member 3639 Active Member

    Been a good while now and no responses.

    Has anyone had any luck in getting picture attachments to display outside of the forum using the parser?
     
  4. masterchief

    masterchief Well-Known Member

    This is what I use to display attachements as thumbnails. I simply place it on PAGE_CONTAINER

    Code:
    <!--  thumbnail gallery -->
    <xen:if is="{$contentTemplate} == 'forum_list' OR {$contentTemplate} == 'forum_view' OR {$contentTemplate} == 'category_view' OR {$contentTemplate} == 'thread_list' OR {$contentTemplate} == 'thread_view'">
    <div style="background-color: #F9D9B0; border: 1px solid #7192a8; padding-left: 10px; -moz-border-radius: 5px 5px 0px 0px; width: 881px; overflow: auto;">
    Featured Threads - Click on thumbnail for message thread
    </div>
    <div style="border: 1px solid #7192a8; -moz-border-radius: 0px 0px 5px 5px; width: 891px; overflow: auto;">
               <a href="http://localhost/xenforo/threads/2/#post-2"><img width="60" vspace="2" hspace="1" height="80" title="Comic character" src="http://localhost/xenforo/attachments/2/?embedded=1" alt="toonman"></a>
    </div>
    </xen:if>
    
    <!-- top breadcrumb, top ctrl -->
    
    
     
  5. Member 3639

    Member 3639 Active Member

    Reread my post mate, this is for outside the forum.
     
  6. masterchief

    masterchief Well-Known Member

    where do you wish to display them... on a web page or what?

     
  7. Member 3639

    Member 3639 Active Member

    Yes on my website outside the forum :)
     

Share This Page