Jump to content

Marty Walker

Members
  • Posts

    629
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by Marty Walker

  1. Hi everyone,

    Long time no post. I'm trying to get HannaCode setup with a form from Mailchimp. When I try I get a server error 403 and it doesn't matter if I set it up as HTML/JS or PHP. Screengrab of the code attached. Running PW2.6.1, PHP 5.6.21

    <!-- Begin MailChimp Signup Form -->
    <link href="//cdn-images.mailchimp.com/embedcode/classic-10_7.css" rel="stylesheet" type="text/css">
    <style type="text/css">
    	#mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }
    	/* Add your own MailChimp form style overrides in your site stylesheet or in this style block.
    	   We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */
    </style>
    <div id="mc_embed_signup">
    <form action="//blahblah.us8.list-manage.com/subscribe/post?u=1234&amp;id=1234" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
        <div id="mc_embed_signup_scroll">
    	
    <div class="indicates-required"><span class="asterisk">*</span> indicates required</div>
    <div class="mc-field-group">
    	<label for="mce-EMAIL">Email Address  <span class="asterisk">*</span>
    </label>
    	<input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL">
    </div>
    <div class="mc-field-group">
    	<label for="mce-FNAME">First Name </label>
    	<input type="text" value="" name="FNAME" class="" id="mce-FNAME">
    </div>
    	<div id="mce-responses" class="clear">
    		<div class="response" id="mce-error-response" style="display:none"></div>
    		<div class="response" id="mce-success-response" style="display:none"></div>
    	</div>    <!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups-->
        <div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_67374670051f55f34d9e9d1c6_063582bb26" tabindex="-1" value=""></div>
        <div class="clear"><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button"></div>
        </div>
    </form>
    </div>
    
    <!--End mc_embed_signup-->

     

  2. On 3/17/2015 at 0:22 AM, adrian said:

    I have actually already made a start on a feature rich search and replace module which I will get around to finishing up sometime soon. It provides the ability for searching and then showing the search term in context for each match. You can then choose which matches get replaced, or replace all.

    Stay tuned!

    Hi Adrian,

    Did your search/replace module ever see the light of day?

  3. Hi,

    I'm looking for some pointers on how to style page list fields. Although it's great being able to have the fields displayed there's not enough of a visual distinction between the page title and the field names. I've been through all the ones in the modules directory but none of them have been kept up to date.

    I'm not against writing CSS to match the page list selectors. Is there a simple way for me to append a CSS file to the admin stylesheet perhaps?

  4. Hi all,

    I'm using the standard search template and I want to have my search results pickup some image tags. I've added the tags option to my images field (portfolio_images). The tags output fine elsewhere but I'm wondering if I'm missing something or if it's even possible at all.

    <?php
    
    $matches = $pages->find("template=portfolio, title|first_name|last_name|body%=$q|portfolio_images.tags*=$q, limit=150"); 
    
    
  5. Hi all,

    One of the sites I look after has a home page that displays some random artist artworks (exhibit a: http://www.illustratorsaustralia.com/). In the middle of all the thumbnails there's a large message box which is inserted there using jQuery. They want to change this layout to one that uses something like jquery masonry to flow the random thumbnails around an even larger message box. I have the code for the random images and the message box all worked out.

    My question is: is there a way to insert (for want of a better word) that message code into the random thumbnails loop after a certain amount of thumbnails before masonry gets hold of it all and rearranges everything?

    eg:

    • thumbnail
    • thumbnail
    • thumbnail
    • message
    • thumbnail
    • thumbnail
    • thumbnail

    Thanks for any help/suggestions.

  6. I'm trying to use this simple hanna code in a CKEditor field (using PW 2.6.1):

    <?php
    	echo "<ul>";
    	foreach ($pages->get('/contact-us/')->children as $offices) {
    		echo "<li><h2>{$offices->title}</h2>{$offices->body}</li>";
    	}
    	echo "</ul>";
    

    The 'contact-us' page has 4 child pages with the office info. If I add the above code to my template it works fine but if I add the HC to my body field it strips most of the content from that body field out. The only textformatter I have on that body field is the HC one. The 'Save & Test' shows the results fine so I have no idea what I'm doing wrong.

    edit: for some reason if I remove the '$offices->body' from my echo it works.

    edit 2: just read the previous pages and realise now it's a bug.

  7. Thanks for testing it Marty! How do you like the new edit links?

    I cannot reproduce the delete tab issue here. It shows for you if you allow all the tabs? Do you use $fredi->hideTabs() method at all (not required though)? Interested to hear if that works.

    If I use this I don't see the Delete tab either:

    <? echo $fredi->hideTabs("children|settings")->setText("Edit your page")->render("title|body");

    This works fine though:

    <? echo $fredi->hideTabs("children|delete|settings")->setText("Edit your page")->render("title|body");
    • Like 1
  8. On the setup I use this on my date field (publish_date) is setup to output only dates (no times) as: April 8, 2012. I haven't used this with a multi-language setup either so I'm not sure if that has anything to do with it.

    Screen-Shot-2015-05-18-14-53-31.png

    My 'news-archive.php' template just lists the child pages of the year url I'm in.

×
×
  • Create New...