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!
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.
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
{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.
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.
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?
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!
😊
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];
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.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.