Jump to content

nikola

Members
  • Posts

    253
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by nikola

  1. How can I pass arguments from template to a function that resides in the module? I'm making a new module and can't figure it out... Normally if I use a function directly in template(s), I can do the following: echo function($1, $2, $, $4); where $1, $2, $3, $4 are arguments passed to a function.
  2. Ryan, I've used Smooth Navigational Menu found at http://www.dynamicdrive.com/dynamicindex1/ddsmoothmenu.htm.
  3. I've made a redesign for old client of ours and ported it to ProcessWire. Old version of the site was also made by me and it was fueled by wolfcms in the backend. Every single thing on this site is controlled by PW. ProcessWire proved again as my first choice of CMS for building such projects as this. Link: http://www.senso-plus.hr/
  4. Here is my contribution for Croatian translation. I agree witch Nico about the plurals, for know I changed the context so it can work with singulars and plurals, but plurals would be nice as an option. ProcessWire-Language-Croatian.zip
  5. As you might now it, Google search engine uses <title></title> tag as very relevant source of information about your web site. Sometimes it's good to use "breadcrumbs" in <title></title> tag to define structure of categories and such. If you want to use this kind of <title></title> tag instead of regular page title, then you could do the following: <title><?php $root = $pages->get('/'); foreach($page->parents()->remove($root)->append($page)->reverse() as $parent) { echo "{$parent->title} - "; } echo "COMPANY NAME"; ?></title> Replace "COMPANY NAME" with the name of your company etc.
  6. Ryan, TinMCE version used in PW is rather old (v.3.3.9.2), current version is 3.4.6. Have you considered updating it in default distribution?
  7. If we use fonts from font face library we would lose support for all special charcters now included in cufon font used in this theme. The only way would be to create custom font face kit and to replace cufon references. I might try that...
  8. Thank you all for the compliments about the theme. I'm going to release something else pretty soon
  9. I've made changes as suggested. Hope you'll like it... see the first post.
  10. apeisa, glad you like it! I'll made suggested modifications tomorrow, makes sense Also I'll fix title font, forgot to include other special characters besides Croatian...
  11. The top button is back I haven't used latest main.js file, now everything is back in order. First post updated... I've attached screenshot - latest Chrome running Moderna theme (exact build as yours), code normally shows text links... weird ... Anyone else experiencing this issue?
  12. I've tested it in Chrome and it looks fine. Did you try to flush your cache? I've lost the top save button in the process of making the theme, must investigate it, I'll post updated version. @Diogo: I thought about making the pink alternative theme, it might come in next few days...
  13. EDIT: Fixed missing top right button (didn't show 'cause I've been using old main.js file...) EDIT2: Fixed font issue, it display now correctly all European characters, cyrillic characters (Russian, Macedonian, Bulgarian, etc.) and also Greek characters (slkwrm, apeisa) Fixed sidebar using media query / added scrollbar if window is to narrow (apeisa) Downsized page title font a little bit (diogo) Reworked page list sort selector (apeisa) I've made a new admin theme called "Moderna", screenshots are attached below. For full user experience, download cirkuit.zip (it's TinyMCE theme) and put it into this directory: /wire/modules/Inputfield/InputfieldTinyMCE/tinymce-3.3.9.2/themes/advanced/skins/ then open InputfieldTinyMCE.js located in /wire/modules/Inputfield/InputfieldTinyMCE/ directory and replace skin: "o2k7" with skin: "cirkuit". Hope you'll like it... cirkuit.zip moderna-admin-template.zip moderna-admin-template-v1.1.zip
  14. nikola

    Happy birthday Ryan!

    My pleasure I thought it would be nice to make you a little gift
  15. I've found about ProcessWire while searching for php cms fields keywords, but can't honestly remember on which site I've spotted link to PW site. I've tried the demo, installed it, and immediately fell in love with it. Over the years I've tried numerous CMS packages and everyone of them was bloated in this way or another. I used WordPress and WolfCMS before PW, but abandoned them in the flavor of PW. I need to sharpen my PHP knowledge a bit further and then I'll be able to pull the most out PW. I'm really disappointed to hear that opensourcecms uses this kind of poor voting system, because I always felt that it was one of the legit sites for CMS reviews and that the voting system really represents the opinions of the end users. Anyways, congrats on your work so far, looking forward to see PW 2.2 and multilanguage support right out of the box soon.
  16. Everything works fine now. Thank you Soma!
  17. When I use this code it outputs title of the poll, not the poll itself, I have to click it to view it. When I use code that I've posted, I can see the poll normal.
  18. Thanks Soma, for your answer. The thing is that I already have a working poll including <?php $answer->setOutputFormatting(false); ?> I use this code to render the poll <?php if(count($page->poll)) { foreach($page->poll as $poll) { echo $poll->render(); } } ?> and it renders poll just fine, but when I have more than one poll in Poll page located in root of the site, for example: Poll -- Poll 1 -- Poll 2 it renders both of the polls on the same page. I can render only one poll, but then I need to unpublish other polls located under same parent where all polls reside. Because of that I've made a field named poll (type: page) where I can select what polls I want to use. The question is: How can I use "Poll 1" for example on one page, and "Poll 2" on another page, given that page(s) uses template that contains field "poll" where I can select poll I want to appear? I want to avoid showing multiple polls on one page at the same time and I want to choose different poll for different pages...
  19. Using Ryan's example I've made some polls. I've made a field named poll (type:page) and it has "Parent of selectable pages" set to Poll (the page in the root that hold numerous polls). How can I set the default poll in various pages? For example, on home page I want to display "Poll One" and on some subpage I want to display "Poll Two"? I can select it through the admin by the poll field, but how can I output it in the templates that way?
  20. Ryan, thanks a lot, will try it tomorrow. I'll let you know how it went. Also, I'm close to completion of new admin theme for PW, will post it by the end of the week. My little contribution back to the community...
  21. I have a job application form that needs to be updated with an upload field that will accept only images (jpg, gif, png). I need the following function: When users will submit the form, the form will send gathered information in the body of the e-mail and the uploaded image as an attachment. The form functions just fine without image upload field. I have this code right now in my form (I've stripped out everything except what isn't working): <?php if(isset($_POST['submit'])) { $filename=$_FILES["file"]["name"]; $filetype=$_FILES["file"]["type"]; $filesize=$_FILES["file"]["size"]; $filetemp=$_FILES["file"]["tmp_name"]; $recipient = "mail@mail.com"; $subject = "Subject"; $message = "Message"; $fp = fopen($filetemp, "rb"); $file = fread($fp, $filesize); $file = chunk_split(base64_encode($file)); $num = md5(time()); //Normal headers $headers = "From: $email\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: multipart/mixed; "; $headers .= "boundary=".$num."\r\n"; $headers .= "--$num\r\n"; // This two steps to help avoid spam $headers .= "Message-ID: <".gettimeofday()." TheSystem@".$_SERVER['SERVER_NAME'].">\r\n"; $headers .= "X-Mailer: PHP v".phpversion()."\r\n"; // With message $headers .= "Content-Type: text/html; charset=utf-8\r\n"; $headers .= "Content-Transfer-Encoding: 8bit\r\n"; $headers .= "".$message."\n"; $headers .= "--".$num."\n"; // Attachment headers $headers .= "Content-Type:".$filetype." "; $headers .= "name=\"".$filename."\"r\n"; $headers .= "Content-Transfer-Encoding: base64\r\n"; $headers .= "Content-Disposition: attachment; "; $headers .= "filename=\"".$filename."\"\r\n\n"; $headers .= "".$file."\r\n"; $headers .= "--".$num."--"; mail($recipient, $subject, $message, $headers) or die("Error!"); fclose($fp); } Also I don't have the part that checks and allows only images to be uploaded. Maybe it needs access to temp folder and I don't know how to make this work...
  22. I was typing fast and didn't read it afterwards. What I meant is that it would be nice to implement those little squares with pluses and minuses before the names of the pages and that little dotted borders... Just as cosmetic addition. Might dive into the css of ProccesPageList and I might come with something...
  23. It would be nice to have slightly advanced page tree like in these example: http://cssglobe.com/lab/sitemap_styler/01/ http://cssglobe.com/lab/sitemap_styler/02/ Ryan, what do you think? Have you considered implementing this kind of a tree?
×
×
  • Create New...