How is this done on AA? First few words of post showing in....

Discussion in 'vBulletin Discussions' started by ArnyVee, Sep 18, 2009.

  1. Wayne Luke

    Wayne Luke Regular Member

    991
    276
    202
    That is because you have either another plugin adding the post table in already (as well as the preview) or hardcoded changes.
     
  2. ArnyVee

    ArnyVee Regular Member

    1,264
    39
    404
    So, what do you think is my next step Wayne?
     
  3. Wayne Luke

    Wayne Luke Regular Member

    991
    276
    202
    Put $threadinfo[preview] in your showthread template and see if it shows up. I am thinking it will without the preview.
     
  4. Lynne

    Lynne Regular Member

    333
    32
    164
    I know, but that article shows how to get the preview text available to you in other templates.
     
  5. ArnyVee

    ArnyVee Regular Member

    1,264
    39
    404
    Yes Lynne, I already did that (mentioned it in the first post), but I wanted to see how to add it to the description like here on AA. :)

    Wayne, it showed up when I placed "$threadinfo[preview]" 'near' the spot that I want it. :D

    Now, where do I place it so that it shows in that same 'cell' as the Forum title?

    Or, do I need to add a new table and pull the thread title and description and just turn off the "Show Forum Descriptions in Forum Listings" option?
     
  6. ArnyVee

    ArnyVee Regular Member

    1,264
    39
    404
    Woo hoo! Found it! :)

    I added $threadinfo[preview] in the navbar template within this piece of code....

    Code:
    <if condition="$show['forumdesc']">
    <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
    <tr>
    <td class="alt1" width="100%"><strong>$foruminfo[title]</strong> <span class="smallfont">$foruminfo[description]</span></td>
    
    
    </tr>
    </table>
    <br />
    </if>
    Added a line break and then the $threadinfo[preview] after it and it works! Now, I just have to edit the font to be a little smaller and I'll be good! :)

    Thanks Wayne and thanks Lynne!

    EXAMPLE: http://www.magicthemeparks.com/mk/forum/showthread.php?t=19

    EDIT: I just noticed on another thread that I started with a pic on that the url of the pic actually shows. Anyway around that other than to move the picture out of the first couple of sentences of the post?

    EXAMPLE: http://www.magicthemeparks.com/mk/forum/showthread.php?t=7

    EDIT: Just moved the picture below a couple of sentences of text and just have to remember not to start a thread with a pic for temporary solution :D
     
  7. ArnyVee

    ArnyVee Regular Member

    1,264
    39
    404
    Wayne,

    Can I simply delete the plugin we were attempting to create with no issues?
     
  8. Wayne Luke

    Wayne Luke Regular Member

    991
    276
    202
    Yes, since you hard coded it into the file, you don't need the plugin.
     
  9. ArnyVee

    ArnyVee Regular Member

    1,264
    39
    404
    Thanks again for your help Wayne! :)
     
  10. Lynne

    Lynne Regular Member

    333
    32
    164
    Exactly what you you want to do with the image instead? The easy solution is to do a str_replace and turn it into a link. Two things to replace:

    find: img src="http
    replace with: a href="http
    AND
    find: border="0" alt="" />
    replace with: target="_blank">Image</a>

    You could put those in an array and do the str_replace after creating the preview.
     
    2 people like this.
  11. Mikey

    Mikey Mikeylicio.us

    484
    92
    394

    Lol, I did get it working, then I broke it again, as the str_replace completely ignores the conditionals, so I'll use a different method.

    It works with the $navbar, $navbar {code}, so I think the comma is just as good.
     

Share This Page