We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Mark Huot File Extension

Development and Programming

tb1200's avatar
tb1200
18 posts
16 years ago
tb1200's avatar tb1200

We are having some problems with the plugin, when we try to use the variable pair:

{fieldname}

{/fieldname}

we get this error in the core functions and nothing renders.

Parse error: syntax error, unexpected T_ENDIF in /home/evokepho/public_html/evokesys/core/core.functions.php(637) : eval()’d code on line 257

if I use the singe variable

{fieldname}

then i can see the first image. but not the rest of the data. has anyone experienced this? any advice is greatly appreciated!

       
bkuberek's avatar
bkuberek
124 posts
16 years ago
bkuberek's avatar bkuberek

Never seen this error before. Do you have the latest Extension? What do you have within {fieldname}{/fieldname}?

       
tb1200's avatar
tb1200
18 posts
16 years ago
tb1200's avatar tb1200

we have tried several different combinations based on the previous examples and the more current ones. we are using: File, by Mark Huot (v.3.1.1) and I have tried the syntax of using the plural of the {fieldname+s} {/fieldname+s} and that didnt work either. The only thing that has given us a result was the single variable {fieldname}, whenever we use {fieldname} {/fieldname} is breaks that core regardless of whats inside. The field name we are using is {blogimage} and the main upload folder. the images are uploading fine and resizing correctly with the thumbs being generated, but I can’t access the data from the template. I hope this info can provide some light, we have been trying to get this going for quite a while, it seems like a great extension, thanks for your help in keeping it alive.

       
bkuberek's avatar
bkuberek
124 posts
16 years ago
bkuberek's avatar bkuberek

What is your Expression Engine Version? Can you copy and paste your code for me to see it? (wrap your code with code tags)

[code]
code
[/code]
       
tb1200's avatar
tb1200
18 posts
16 years ago
tb1200's avatar tb1200

Thanks for the fast reply, we really hope to get this knocked out soon. some fresh eyes will deffinitely help. we are using ExpressionEngine 1.6.4

{assign_variable:my_weblog="blog"}
{assign_variable:my_template_group="site"}

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{exp:weblog:info weblog="{my_weblog}"}{blog_title}{/exp:weblog:info}</title>
        [removed][removed]
        [removed]
            swfobject.registerObject("menu", "9.0.0");
        [removed]
<style type='text/css' media='screen'>@import "{path=includes/main_css}";</style>
</head>

<body>
        <div id="container">
        
<div id="headerArea"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%" id="menu">
                
                                
                                                

                <!--[if !IE]>-->
                <object type="application/x-shockwave-flash" data="{site_url}flash/header host.swf" width="100%" height="100%">
                                
                                                

                <!--<![endif]-->
                    
                        {site_url}images/flash-header-template.jpg
                <!--[if !IE]>-->
                </object>
                <!--<![endif]-->
            </object></div>

<div id="bodyArea">
<div id="bodyAreaWhiteblog">


<!-- BEGIN MAIN -->
<div id="main">
<div id="mainhead">
{site_url}images/blog-head.jpg

<div class="hrDivider"></div></div>



{exp:weblog:entries weblog="blog" orderby="date" limit="3" paginate="top"}
<div class="entry">
{paginate}

<div id="toppagination">
Page {current_page} of {total_pages}
</div>

{/paginate}

<h2><a href="http://{title_permalink=">{title}</a></h2>
Posted by {author} on {entry_date format="%M %d, %Y"}

{blogbody}

{blogimage}

{/blogimage}

<div class="commentStuff">

<a href="http://{title_permalink=">{site_url}images/comment-button.gif</a> 

<a href="http://{title_permalink=">{comment_total} Comments</a></div>

<hr>

</div>

{/exp:weblog:entries}

{exp:weblog:entries weblog="blog" orderby="date" sort="desc" limit="3"}
{paginate}
<div id="pagination">

{pagination_links}

</div>
{/paginate}
{/exp:weblog:entries}
<div class="hrDivider2"></div>

<!-- END MAIN -->
</div>
</div>

<div id="footerArea">
<div id="footerSig">
<div class="footerLeft"></div>
<div class="footerRight"></div>
</div>
</div>
</div>
</div>
</body>
</html>

The tags that keep breaking things are after the blogbody, we have tried different things in between the tags, but it seems that the tags themselves are rendering that error on the core functions. Big thanks again for your help

       
bkuberek's avatar
bkuberek
124 posts
16 years ago
bkuberek's avatar bkuberek
{blogbody}

{blogimage}

{/blogimage}
<div class="commentStuff">

<a href="http://{title_permalink=">{site_url}images/comment-button.gif</a> 

<a href="http://{title_permalink=">{comment_total} Comments</a></div>

<hr>

</div>

{/exp:weblog:entries}

{exp:weblog:entries weblog="blog" orderby="date" sort="desc" limit="3"}
{paginate}
<div id="pagination">

{pagination_links}

</div>
{/paginate}
{/exp:weblog:entries}

This should be used this way

{blogimage}

{file_url}

{/blogimage}

if it doesn’t there is something wrong with your system. Make sure that all configuration is done right and that your file system is not corrupt.

I noticed that you end the {exp:weblog:entries} the start it again for the bottom pagination. You don’t have to do that. You can have pagination=”both” then add your pagination at the top and at the bottom.

       
tb1200's avatar
tb1200
18 posts
16 years ago
tb1200's avatar tb1200

man, yeah. The bottom Exp:weblog:entries was the thing that was making things broken. Unfortunately when we do the pagination=”both” it treats both paginations as the same, which means listing the current page instead of listing the links to the additional pages. Its so close!!! Im considering also implementing a series or custom fields that will be used to comment on each picture. these will be available depending on the count variable. unfortunately, the pagination is now the obstacle we need to cross before further development. Thanks again.

       
Andrew Gunstone's avatar
Andrew Gunstone
101 posts
16 years ago
Andrew Gunstone's avatar Andrew Gunstone

Hi guys. Quick question. Is there any reason why I can’t use 2 “File” field types on one form?

I have setup 2 File custom fields - the first one is called “artwork_image” and one called “artist_photo”. They are both using the same “File Upload Directory”.

When outputting {artwork_image} it works correctly. It picks up the file url, and image name. Outputting the second one only displays the file name! Also, it adds xhtml around it!

{artwork_image}
{artist_photo}

outputs something like…

http://www.domainname.com/images/artwork/artworkfilename.jpg
<img >artistphotoname.jpg" >

They both upload correctly to the directory.

Any thoughts?

       
Andrew Gunstone's avatar
Andrew Gunstone
101 posts
16 years ago
Andrew Gunstone's avatar Andrew Gunstone

Ha! Worked it out. Just turns out I am an idiot.

I didn’t realise that you couldn’t upload a file with “_thumb” as a suffix to the filename (as the extension creates them with this name).

So basically you can upload a file called “thumb_blahblah.jpg”, but not “blahblah_thumb.jpg”.

Doh!

😊

       
Nico Smit's avatar
Nico Smit
48 posts
16 years ago
Nico Smit's avatar Nico Smit
1. Add max width and max height to the extension settings so it doesn’t use the max width and max height of the Module preferences. The problem with the current setup is that once enabled, the upload destination can’t be used by the default upload utility because images will be resized to the max dimensions set.

I’ve noticed the Mark Huot File upload mechanism forces a image to the max dimensions set in the upload preferences, if you set Resize Images on Auto. Of course, this is not how it should work. If you’d like the extension to do a (max)width-/height check first, then change the following in ext.mh_file_ext.php on line 939. Now, it first checks if the image is bigger then the maximum dimensions.

$dst_width = ($file_field['max_width']!='')?$file_field['max_width']: $dimensions[0];
$dst_height = ($file_field['max_height']!='')?$file_field['max_height']:$dimensions[1];

into:

$dst_width = ($file_field['max_width']!=''&&$file_field['max_width']<$dimensions[0])?$file_field['max_width']: $dimensions[0];
$dst_height = ($file_field['max_height']!=''&&$file_field['max_height']<$dimensions[1])?$file_field['max_height']:$dimensions[1];
       
Wes Rice's avatar
Wes Rice
103 posts
16 years ago
Wes Rice's avatar Wes Rice

I recently made some changes to the extension that extended its features.

I incorporated an external class, Pclzip, and it allows you to upload zip file, unzip them, and then it saves the contents of the zip file like you uploaded each picture one by one. It works great for photography websites where you might upload a couple of hundred pictures for a large gallery. I have also begun work on maintain the order of which the pictures are displayed.

There are a couple of bugs I am still working out though, so I’m not really ready to post it.

       
Nico Smit's avatar
Nico Smit
48 posts
16 years ago
Nico Smit's avatar Nico Smit

That sounds very good! The possibility to use a title with each image and you have yourself a extended gallery.

Please, keep us updated..

       
Wes Rice's avatar
Wes Rice
103 posts
16 years ago
Wes Rice's avatar Wes Rice

Here is a screen of the control panel and the modded extension in action. (See Attachments)

I’m thinking about adding exif info capabilities as well.

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
16 years ago
Mark Bowen's avatar Mark Bowen
Here is a screen of the control panel and the modded extension in action. (See Attachments) I’m thinking about adding exif info capabilities as well.

Wow would love to get to seeing that when you are ready to release it into the wild. Sounds really great!

Best wishes,

Mark

       
bkuberek's avatar
bkuberek
124 posts
16 years ago
bkuberek's avatar bkuberek

Nice job lockwesmonster ! You’re really taking the bull by the horns. Thanks for taking the time to help improve the extension. I’ve been really busy I can’t invest any time at the moment. Thanks again for the work you’re doing.

       
1 2 3 4

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.