Jump to content

Zahari M.

Members
  • Posts

    198
  • Joined

  • Last visited

Everything posted by Zahari M.

  1. Hey Adrian I just downloaded version 5 and one minute later I came back here to report how awesome it is and that it works!!! But now, what do I see? There is now a version 6! You are truly prolific and awesome! Just as a note, Video Image Names lists as its placeholder text: thumbnail_large, thumbnail_medium, thumbnail_small. Perhaps this placeholder list needs to be swapped around as it says below this: Default: thumbnail_small, thumbnail_medium, thumbnail_large What I did was I swapped around the placeholder text to match your default description text, that is to say I entered thumbnail_small, thumbnail_medium, thumbnail_large and then I selected First Image under Which Images. This works great!! Your idea of adding the video ID to the thumbnail was brilliant too Adrian!! AWESOME!!!!!!! :-)
  2. Wow! Isn't this a truely amazing community!!! I am so so so grateful to Adrian for having created this! I'm trying to create a site that will help categorize and show videos from my Vimeo account. The oembed module from Ryan makes it so easy to just copy the url and paste it into our text editor. This was one great great step forward. The thing that was missing / needed imho was a way of automatically fetching the thumbnails of these videos so that when we create a list of video episodes with a title and description, we could make these excerpts and our page of results way more interesting and media rich by displaying a thumbnail of our video as well!! I'm one slow learner. Go ahead and laugh... but the first thing I thought of to do all this was create an image field and then looked for a screen capture program that could take a picture of the oembeded video showing on my page at full size, and then manually feeding that screen grab into a custom image field for the page to subsequently display it resized into a thumbnail. So i thought after doing this the manual way, surely the video hosters might give you a way of extracting an image from the video and sure enough, looking at the Vimeo API, they did. And so I wrote to Adrian asking him if he could help me / point me into the right direction as to how to go about doing this. I initially thought that we needed to modify Ryans oembed module. But Adrian explained to me that way to go about it conceptually was to create a hook before you save the page, get the image from Vimeo or whoever, and use the PW API to save this to an image field. Ahhh... an Eureka moment for me! Now hooks in PW make more sense to me and of course having the obvious need for this hook, we now know that we need our PW API for saving an image so the API's relevance seems much greater now too!! Somethings abstract instantly become a developers best friends!! BTW, I used hooks in WordPress quite a bit as basically there were so many things you wanted WP to do differently, and so hooks are typically used there to swap out and change the behaviour of a particular function. But I never really looked at hooks in PW as it seems to do everything right in the first place and as a result never really had any reason to even look into them Anyways... can't wait to try this module and see how it works! Thank you Adrian !!!!!!!
  3. Another tip for anyone working with the PW Foundation theme.... You might want to consider editing the viewport to this, i.e. adding the initial scale bit. <meta name="viewport" content="width=device-width initial-scale=1.0" /> I found that I was getting unwanted text resizing on the ipad when swapping between landscape and portrait. In addition I was getting the "mobile version" of the top nav bar in landscape mode. Editing the viewport values as above solved these issues for me.
  4. A tip for updating Foundation. Not sure if its relevant or not guys... but recently I tried to update the foundation directory to the latest version. For some reason, maybe due to me, maybe not, the site broke as it could not seem to load the style sheet / js. After much head scratching, turns out the foundation directory / files permissions and group / owner were all wrong. After struggling with this for ages... I have now turned on the groups and permissions columns in my ftp client and now look at them very closely! Also, whilst you can use terminal to do this, there is the dual pane Mac program - Path Finder, which amongst many other things enables you to easily see these same details beside your filenames, locally on your machine
  5. Saw your checkout Font Awesome Page Label. I love Font Awesome too !
  6. Just a quick one diogo... Is yours 32 bit or 64 bit? Cheers!
  7. Hi diogo Thanks for that! I'll start reading up on the documentation for it! Cheers
  8. Hi Guys! Ok... so I am about done with my lil site and am looking at getting onto a VPS. A few here have suggested Linode and I would like to have a play with their Linode 1GB system. So... there seems to be an overwhelming array of scripts out there... the most is 182 scripts for Ubuntu! Would anyone have any suggestions what I could use that would create a robust solution for my website? Would Ubuntu be a good one? Which one if!? CentOs maybe? What are those of you here who are with Linode using yourselves? Any tips and suggestions to get a beginner like me get a basic site going smoothly? Any pitfalls to watch out for? Many thanks guys!
  9. Thanks Soma and 3fingers! Great to know that we can achieve it this way too if we need to! Your all awesome! Cheers guys!
  10. Hi diogo! Thanks for the reply and your help! At first there were no horizontal dividers displayed at all! But it got me thinking and after tweaking it and rearranging it.... it now works! Yay! foreach ($tps as $tp) { $out .= "<p class='title'><a href='{$tp->url}'>{$tp->title}</a></p>"; $out .= "<p class='summary'>{$tp->summary}</p> "; $out .= ($tp === $tps->last()) ? "" : "<hr />"; } Thanks a lot diogo for setting me on the right path! Many thanks! Cheers
  11. Hi Guys! Hoping some kind soul could help me out with my poor php abilities! Ok... so my site is almost there. I have gotten nearly everything to work and am on the home stretch. So... I have been trying to create a couple of functions that lists "page excerpts" for Child Pages and excerpts for "Pages Tagged with Tag X"... Here is what it generally looks like... What I would like to do is use a <hr /> tag to create a horizontal divider beneath each excerpt as you see above, BUT, not display one after the last excerpt. So.... one of my functions goes like this: function html_TaggedPages(){ $page = wire('page'); $tps = wire('pages')->find("tags=$page,sort=sort"); $out = "<div class='posts'>"; foreach ($tps as $tp) { $out .= "<p class='title'><a href='{$tp->url}'>{$tp->title}</a></p>"; $out .= "<p class='summary'>{$tp->summary}</p> " . "<hr />"; } $out = rtrim($out , " <hr />" ) ; $out .= " </div>"; return $out; } So I was hoping that, and this is the first time I'm using rtrim, that it would remove that last <hr />. In fact it does and the function does work. But if we look at the source code of the page, the last closing paragraph tag is getting a bit chopped off too! The end tag gets rendered as </p So... can anyone show me how I can rework this function to remove that last <hr /> and keep the last </p> tag intact? I've never used a counter before but suspect I might have to go that way. Any help much appreciated! Cheers guys!
  12. Hi Guys! Anyone here have any experiences with software that assists in the running of a hospital? Any suggestions or thoughts welcome Cheers
  13. Nice site Craig Well done mate! P.S. I would put a black border around the favicon to mirror the consistent color theme perfectly
  14. Snippets looks very interesting Manfred62 !! Perfect for my ProcessWire Journey !! Thanks!
  15. Probably rather redundant for all you Mac power users here... I was always thinking one day I will do this..... I use quicklook a lot. Great for previewing text, audio & video files. But it can't preview .md files or .css files. Surely this can be fixed? Today I did it. Here are the solutions... To Quicklook into all the various Markdowns : http://tidbits.com/article/13499 To Quicklook into .css : https://github.com/whomwah/qlstephen/downloads
  16. Hey Martijn Just wanna say that your delegate site profile has been incredibly helpful. Had a chance to take a better look at it just now and there are some excellent concepts there! Thank you so much for this site profile. As I understand so little about ProcessWire, I was looking for a way to establish a sort of bi-directional relationship between an idividual page and a collection of individual sidebars. It's both interesting and great that we are looking at this issue in very similar ways. I did have a slightly different take on how i wanted do a few things.... but I just didnt know where to start due to lack of knowledge of the ProcessWire system. Thanks to your very clever use of php page select code and utilization of the template naming options, I can now see how to create these "bi-directional" relationships. So, thanks again mate! Still a few other basic things that Im working on to get my first site working properly. So hopefully I can start the sidebar system in a couple of weeks. Might have a few questions for you then if Im stuck... hee hee Cheers!
  17. Hey Ryan One for your consideration... I wanted to be able to do two things to the Description text that appears in our admin fields. Add a link to some text and emphasize some text. Currently inputfields.php only accepts Markdown syntax to identify a link via $str = preg_replace('/\[(.+?)\]\(([^)]+)\)/', '<a href="$2" target="_blank">$1</a>', $str); Extending this by adding an additional pattern to catch the Markdown syntax for emphasis which is ** Wrapped In Double Asterisks ** ... $str = preg_replace('/\[(.+?)\]\(([^)]+)\)/', '<a href="$2" target="_blank">$1</a>', $str); $str = preg_replace('/\*\*(.*?)\*\*/', '<strong>$1</strong>', $str); Now gives us the ability to emphasize text. Adding a rule to main.css such as this would round this solution off... .content .description strong { color: #444444; font-weight: bold; } Screenshot for proof of concept available at the bottom of this thread: http://processwire.com/talk/topic/4313-how-do-we-enable-html-tags-in-fields-setup-description-box/ Thanks for reading and hope it may be worthy of inclusion into core! Cheers
  18. Update & Contribution For any one else interested, I noticed that when it comes to ProcessWire translating Markdown to html in our field descriptions, the only syntax that it will recognize is the Markdown syntax for inline links. I really would have liked ProcessWire to have supported Markdowns "strong emphasis" triggered by wrapping text around a pair of asterisks. Digging around further I found a comment by Soma here: http://processwire.com/talk/topic/1116-render-html-in-field-descriptions/?hl=markdown#entry27976 So after lots and lots of Googling, this was found: http://stackoverflow.com/questions/4019187/php-preg-replace-to-turn-xyz-to-bxyz-b So.... going to wire/core/Inputfield.php I added this immediately after line 628: $str = preg_replace("/\*\*(.*?)\*\*/", "<b>$1</b>", $str); And Voila... I can now emphasize text in my descriptions!! Going into /wire/templates-admin/styles/main.css and adding something like this... .description b { color: #444444; font-family: "Helvetica Neue", Arial, sans-serif; font-style: normal; } Ends up giving me this: Hope this helps someone... PS You may prefer using <strong> instead <b> Cheers
  19. Ah thanks guys! I get it now! Solved! Ok...for future reference for the .01% thick dummies club members like me... go visit this page: http://daringfireball.net/projects/markdown/basics Adding this to my description field: Featured Image Display Options. Default: Display In Excerpts. Confused? [Click here](http://majini.org/ ). Gave me this... Thanks again Martijn and Soma!! You guys rock!
  20. Hi Martijn Thanks for the reply. Apologies for not describing my question clearly enough! Silly me! So Martijn, what I am trying to do is work out how to allow the standard admin interface to accept html tags in the description box whenever when we create a new field. Lets try a better screenshot! Make sense? I tried following your link but didnt quite understand it! Sorry... Im a very very slow learner. Any ideas how we can modify the core files to allow this? Cheers!
  21. Hi Martijn! Learning so much from ya. Thanks a bunch! I guess I poorly worded my question. I think a screen shot is in order! Trying to add some html into this area ! Any ideas how? Cheers!
  22. Hi Guys! Been working on building my admin interface and it's coming along great! So, as the question asks.... is it possible to enable html tags to be recognized in a fields description box? How could I do this? The reason for this is that I would like to add a link to an internal page for documentation / clarification purposes for a site admin and place it right beside a checkbox or select... Something like... <strong>Featured Image Display Options.</strong> Default: Display Featured image in listings only. Help: <a href="pwrocks.com/help/featured_image">Featured Image Options</a> Anyone know how? Cheers guys!
  23. Sure diogo! Thanks Martijn! I agree about the dummy part!
×
×
  • Create New...