ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Parse {filedir_1} with typography class generates error

September 14, 2010 8:36am

Subscribe [5]
  • #1 / Sep 14, 2010 8:36am

    Corey Szopinski

    2 posts

    Hi-

    I’m pulling an image url via a query, and running into problems parseing out the path.

    When I pull the artist_thumbnail it results in this:

    https://ellislab.com/asset/images/team-photo/newsitem_182x116.jpg

    I found this thread ( http://ellislab.com/forums/viewthread/107547/ ) in the old forums which suggests wrapping the path with the exp:ee_typography like this:

    {exp:query sql="SELECT d.field_id_17 AS artist_thumbnail FROM exp_channel_data d WHERE entry_id='5'"}
    
    {exp:ee_typography allow_image_urls='y'}{artist_thumbnail}{/exp:ee_typography}
    
    {/exp:query}


    However, I get this error:

    Error

    The following tag has a syntax error:

    {exp:ee_typography}

    Please correct the syntax in your template.

     

    I assume the exp:ee_typography is either a module I need to install, or only works with EE 1.X. Any suggestions about how to solve this issue?

    Thanks!

    -corey

  • #2 / Sep 14, 2010 8:30pm

    Brandon Jones

    5500 posts

    Hi Corey,

    That plugin is superseded by the XHTML Typography plugin. Does that help?

  • #3 / Sep 15, 2010 10:54am

    Corey Szopinski

    2 posts

    Hi Brandon-

    No, the problem I’m trying to solve is how to get the full path of a filedir field. How do I convert this:

    https://ellislab.com/asset/images/team-photo/newsitem_182x116.jpg

    into:

    /img/photos/newsitem_182x116.jpg

    ?

    Thanks!

    -corey

  • #4 / Sep 15, 2010 7:03pm

    Brandon Jones

    5500 posts

    Hi Corey,

    The file upload locations are stored in the exp_upload_prefs table. You’re using a custom query to pull raw information from the database, and the image src URLs you’re seeing are exactly how they are stored in the database.

    We can’t specifically support custom queries, but if you’d like I can move this over to the CodeShare Corner for further input on how to parse out the filedir tags manually.

  • #5 / Nov 05, 2010 1:33pm

    Sprocketeer

    37 posts

    Easy answer: just make

    https://ellislab.com/asset/images/team-photo/

    a global variable equal to the path in your upload preferences. Works like a charm!

  • #6 / Nov 06, 2010 3:48pm

    Greg Salt

    3988 posts

    Hi Corey,

    Does Sprocketeer’s advice help you out here?

    Cheers

    Greg

    @Sprocketeer, thanks very much for helping out.

  • #7 / Dec 01, 2010 6:45am

    sherpanaut

    58 posts

    I’m having a similar problem… filedir_1 is not being parsed inside my safecracker form and wrapping it with channel tags to parse filedir_1 is breaking my form.

    Sprocket’s suggestion was a genius piece of advice and a really easy way to fix a problem that could take me hours to fix.

    Cheers!

  • #8 / Dec 01, 2010 4:47pm

    Ingmar

    29245 posts

    Glad to see you’re all set. Please post again as needed.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases