Jump to content

MikeB

Members
  • Content Count

    48
  • Joined

  • Last visited

Community Reputation

36 Excellent

About MikeB

  • Rank
    Jr. Member
  • Birthday 04/29/1961

Profile Information

  • Gender
    Male
  • Location
    Trenton, NJ

Recent Profile Visitors

2,423 profile views
  1. I have used the field in a formbuilder form. I get the error if I complete the field on submission of the form. If I leave the field blank (It is optional) I get no error. Hope this helps you track it down. Anything else I can send you to aid in debugging?
  2. I am continuously getting the same error flagged. Do you have any ideas what I could be doing wrong. I have checked again and again, re-read the documentation countless times. Still can not see what I have done wrong. If you need any more information let me know. I have just today updated to the latest version and the issue persists.
  3. Ryan replied back to my issue on the Form Builder support forum. Here is the solution he suggests. And the way I did it myself, before I saw his post: Both work, but it's my guess that Ryan's is the better way, as he has way more experience then I have.
  4. An update to the xsl sylesheet above. Tablesorter is not required for zebra striping, and so jquery is not required. Added CSS3 nth-child(odd) styling instead. <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="2.0" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:template match="/"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>XML Sitemap</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <style type="text/css"> body { font-family: Helvetica, Arial, sans-serif; font-size: 18px; color: #545353; } table { border: none; border-collapse: collapse; } #sitemap tr.odd { background-color: #eee; } #sitemap tbody tr:hover { background-color: #ccc; } #sitemap tbody tr:hover td, #sitemap tbody tr:hover td a { color: #000; } #content { margin: 0 auto; width: 1000px; } .expl { margin: 10px 3px; line-height: 1.3em; } .expl a { color: #da3114; font-weight: bold; } a { color: #000; text-decoration: none; } a:visited { color: #777; } a:hover { text-decoration: underline; } td { font-size:14px; } th { text-align:left; padding-right:30px; font-size:12px; } thead th { border-bottom: 1px solid #000; cursor: pointer; } tbody tr:nth-child(odd) { background-color: #E8E8E8; } </style> </head> <body> <div id="content"> <h1>XML Sitemap</h1> <p class="expl"> Generated by <a href="http://processwire.com/">Processwire</a> this is an XML Sitemap, meant for consumption by search engines. </p> <p class="expl"> You can find more information about XML sitemaps on <a href="http://sitemaps.org">sitemaps.org</a>. </p> <p class="expl"> This sitemap contains <xsl:value-of select="count(sitemap:urlset/sitemap:url)"/> URLs. </p> <table id="sitemap" cellpadding="3"> <thead> <tr> <th width="75%">URL</th> <th width="12%">Last Change</th> </tr> </thead> <tbody> <xsl:for-each select="sitemap:urlset/sitemap:url"> <tr> <td> <xsl:variable name="itemURL"> <xsl:value-of select="sitemap:loc"/> </xsl:variable> <a href="{$itemURL}"> <xsl:value-of select="sitemap:loc"/> </a> </td> <td> <span> <xsl:value-of select="sitemap:lastmod"/> </span> </td> </tr> </xsl:for-each> </tbody> </table> </div> </body> </html> </xsl:template> </xsl:stylesheet>
  5. Thanks Gayan, I have also opened a thread on the Form Builder forum to see if anyone there can help. If I get an answer here or there I will cross post so it is available in both places. I did this as I was not sure where the issue is. More then likely something I am doing wrong due to my lack of PHP knowledge. Thanks once again for the excellent work you did here.
  6. First of, Gayan thank you very much for this excellent profile. I am using this as a starting point on all my own profiles for client work. I have made additions/modifications, but the basis is the same. One question I have is with regards to passing variables on through to the functions in _functions.inc and then on to templates. Specifically I am using Ryan's excellent form builder module. And would like to use his embed method C to embed the form directly into my template. The template I want to embed into is a new version of page-block-type-x. To get the form embedded on to a page is easy. Just include the following in the _init.php file $form = $forms->render('contact'); Then use this on the page template. echo $form; However if I add the second to my page-block-type-x template it says "undefined variable form" I have tried putting the first "render" part into the function in _functions.inc, but then it says "undefined variable forms" Any ideas how I can get this data/variables to bubble through to the partial template?
  7. I would just like to add something to Ryans great template code. I think this may be helpful for some. To add some styling to the output, you can: In "renderSitemapXML" function, change the following $out = '<?xml version="1.0" encoding="UTF-8"?>' . "\n" . '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'; to this $csspath = wire('config')->urls->templates; $out = '<?xml version="1.0" encoding="UTF-8"?>' . "\n" . '<?xml-stylesheet type="text/xsl" href="' . $csspath . '/css/xsl-stylesheet.xsl" ?>' . "\n" . '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'; Then include this file "xsl-stylesheet.xsl" in your "css" directory. <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="2.0" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:template match="/"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>XML Sitemap</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript" src="http://tablesorter.com/jquery.tablesorter.min.js"></script> <script type="text/javascript"><![CDATA[ $(document).ready(function() { $("#sitemap").tablesorter( { widgets: ['zebra'] } ); }); ]]></script> <style type="text/css"> body { font-family: Helvetica, Arial, sans-serif; font-size: 18px; color: #545353; } table { border: none; border-collapse: collapse; } #sitemap tr.odd { background-color: #eee; } #sitemap tbody tr:hover { background-color: #ccc; } #sitemap tbody tr:hover td, #sitemap tbody tr:hover td a { color: #000; } #content { margin: 0 auto; width: 1000px; } .expl { margin: 10px 3px; line-height: 1.3em; } .expl a { color: #da3114; font-weight: bold; } a { color: #000; text-decoration: none; } a:visited { color: #777; } a:hover { text-decoration: underline; } td { font-size:14px; } th { text-align:left; padding-right:30px; font-size:12px; } thead th { border-bottom: 1px solid #000; cursor: pointer; } </style> </head> <body> <div id="content"> <h1>XML Sitemap</h1> <p class="expl"> Generated by <a href="http://processwire.com/">Processwire</a> this is an XML Sitemap, meant for consumption by search engines. </p> <p class="expl"> You can find more information about XML sitemaps on <a href="http://sitemaps.org">sitemaps.org</a>. </p> <p class="expl"> This sitemap contains <xsl:value-of select="count(sitemap:urlset/sitemap:url)"/> URLs. </p> <table id="sitemap" cellpadding="3"> <thead> <tr> <th width="75%">URL</th> <th width="12%">Last Change</th> </tr> </thead> <tbody> <xsl:for-each select="sitemap:urlset/sitemap:url"> <tr> <td> <xsl:variable name="itemURL"> <xsl:value-of select="sitemap:loc"/> </xsl:variable> <a href="{$itemURL}"> <xsl:value-of select="sitemap:loc"/> </a> </td> <td> <span> <xsl:value-of select="sitemap:lastmod"/> </span> </td> </tr> </xsl:for-each> </tbody> </table> </div> </body> </html> </xsl:template> </xsl:stylesheet> You can of course put the file anywhere else, just change the path in the code. Also you can adjust the styling to suit your taste/site. I hope this helps someone. P.S. though I have called the file a "stylesheet" it is actually an XSL Transformation You can read more here http://www.w3schools.com/xsl/xsl_intro.asp
  8. OK kill me for being an idiot. To show my client the progress I am making I posted the dev site up to the server for him to see. Now sometimes, I get confused as to which I am looking at for front end, and which i am developing. I need to do SCSS on local machine, and keep pinging back and forth. So what happened is that down on local I changed the function to nice and simple as I described above. But on local I had forgotten to move the full articles under the summary. So that did not work. Meanwhile up on the server I had moved them, but still had old code working out the link, which is what I was trying to tidy up. Now have everything back in sync. Note to self : Stop working on either local or dev, just use one, then sync at the end. Thank you all for your patience and time. That was my bad. I need to tidy my development process.
  9. Almost what I am trying to do, but here is exactly as best I can describe. I first find a bunch of pages($infoBoxes) with a certain parent and made of a certain template. I then iterate over them assigning them as a variable($infoBox). Now I want to find the child page of that $infoBox and use it's url for a link to that page on it's parent. Think like this, an image appears on my front page, there are a number of them. When you click them a pop-up appears with a summary of the article and a "Read More" link. That link takes the user to the full article. The full article is a child page of the summary in the processwire tree. You can see this in action, or nearly, as the link is not working yet. But look here , scroll to the "info" section and checkout the first item, select it and you will see the pop-up with "Continue Reading". Everything you see on the front page for each info article is in one processwire page for each, and the full article is a child of that page. P.S. I thought as only one child I did not need the $pages array, so instead of children I was using child.
  10. Once again I am stumped on something I feel I should know, and thought I did. I won't bore you with the full code of my function but here are the relevant snipets. function infoBoxesShow() { $infoBoxes = wire("pages")->find("parent=/info-articles/, template=infoItem"); $infoCategories = wire("pages")->find("parent=/info-categories/, template=infoCategory"); $out .="<div id='grida'>"; foreach ($infoBoxes as $infoBox) { foreach($infoBox->infoCategory as $tag) { $tagname = $tag->name; } $child = $infoBox->child->url; /*Here is my issue, this is not getting picked up*/ Then further down the function the url should be output in a popup to get to the "Continue Reading ..." page. $out .="<div class='white-popup mfp-hide' id='{$infoBox->name}'>"; // PopUp Content $out .="<div class='media-box-title'>{$infoBox->headline}</div>"; // PopUp Title $out .="<div class='media-box-date'>{$infoBox->publish_date}</div>"; // PopUp Date $out .="<div class='media-box-text'>"; // PopUp Text $out .="<p>{$infoBox->summary}</p>"; // Some Content Here $out .="</div>"; // End of PopUp Text $out .="<div class='media-box-more'>"; // Read More $out .="<a href='{$child}'> {$infoBox->more_link_text} </a>"; // Link /*$child is not printing anything*/ $out .="</div>"; //End of Read More For the most part i think I have a reasonable understanding of Processwire API, until something like this throws me. Any ideas what I am doing wrong?
  11. Hey guys, i am trying this module out on my development (Local) server before deploying to staging server. I am currently having an issue with CSS URL rewrites. My Local implementation of processwire for the site I am developing is at http://localhost/sitename/ I have tried with config file to add host 'localhost' and 'localhost/sitename'. Neither seems to make a difference the module is rewriting to http://localhost/site/templates/css/{fonts or icons}/filename Any ideas what i should be doing, for instance would this work if I moved the directories for fonts and icons up to just under /templates/ ?
  12. Finally got that fixed. I had downloaded and installed "AdminRestrictPageTree" and assigned to "guest" and "manager". I assumed it would just hide the actual full tree leaving my listerpro lists of pages i want managers to be able to edit. No idea why guest is in there as they can not access that page anyway. Instead it rendered everyone unable to login due to a page redirect loop. I guess the issue was my own fault, I did not have a page to redirect them to, as I did not understand it was going to stop them getting to the admin page altogether. Guess that will teach me to be sure i know what i am doing with contributed modules. Have removed that module now after editing database to remove restricted roles and once again gaining access to the site admin. I guess the reason I could no longer get in was due to the guest role being added to restricted users.
  13. Have just downloaded new version of processwire dev, then emptied cache, sessions on the database. Tried login as superuser, and get the same message. Have checked and cookies are stored. See screenshot. Checked the single entry in session and here is the output. Session|a:3:{s:5:"_user";a:2:{s:2:"id";i:41;s:2:"ts";i:1416583150;}s:27:"ProcessWireUpgrade_branches";a:2:{s:3:"dev";a:5:{s:4:"name";s:3:"dev";s:5:"title";s:11:"Development";s:6:"zipURL";s:63:"https://github.com/ryancramerdesign/ProcessWire/archive/dev.zip";s:7:"version";s:5:"2.5.8";s:10:"versionURL";s:92:"https://raw.githubusercontent.com/ryancramerdesign/ProcessWire/dev/wire/core/ProcessWire.php";}s:6:"master";a:5:{s:4:"name";s:6:"master";s:5:"title";s:13:"Stable/Master";s:6:"zipURL";s:66:"https://github.com/ryancramerdesign/ProcessWire/archive/master.zip";s:7:"version";s:5:"2.5.3";s:10:"versionURL";s:95:"https://raw.githubusercontent.com/ryancramerdesign/ProcessWire/master/wire/core/ProcessWire.php";}}s:7:"message";a:4:{i:0;a:2:{i:0;s:29:"mbrett5062 - Successful login";i:1;i:0;}i:1;a:2:{i:0;s:35:"Your ProcessWire core is up-to-date";i:1;i:0;}i:2;a:2:{i:0;s:27:"Your modules are up-to-date";i:1;i:0;}i:3;a:2:{i:0;s:48:"Saved cache - ProcessWireUpgradeCheck_loginHook";i:1;i:2;}}} As you can see it says i am succesfully logged in. But the page redirect is not working, gets caught in a loop. Previuosly I could login as superuser, but not manager. Now I can not login at all.
  14. Oppps sorry I forgot I already had an issue open about this, see https://processwire.com/talk/topic/8182-unable-to-login-as-any-user-other-then-superuser/ Though that states i had it fixed, but now that is no longer true.
×
×
  • Create New...