-
Posts
7,480 -
Joined
-
Last visited
-
Days Won
146
Everything posted by kongondo
-
ProcessWire ApiGen (dynamic + up to date + all branches)
kongondo replied to kongondo's topic in API & Templates
-
Here's the vimeo version. Cannot get 1080p quality unless you are on the paid plans, but its viewable. I don't think am uploading to vimeo again...this was the first and last time. It takes forever and they restrict the quality, tsk.
-
...I have started the 'slow' upload to vimeo... ....
-
For a minute there I thought you were kidding. Never heard of this German GEMA & SME thing. I have just quickly read up about it. Well, I could try upload the video to Vimeo (would that work?) or you could do me a favour and watch the YT one behind a proxy ...that's not illegal, or is it? Edit: There's also the 'original' demo at Blueimp
-
@congomonster, Sorry this is one of those things that hasn't yet found its way into the documentation. Almost each method in MarkupBlog accepts options to alter its output. For the example you've given, that would be an option in renderComments(CommentArray $comments, $limit = 0, Array $options = null). Within the method, the $defaultOptions are as listed here. The option responsible for 'Post a comment' is 'comments_post_text' => $this->_('Post a comment'), . An example of passing options to the method: $options = array( 'comments_post_text' => 'My Text for Post-a-Comment', 'comments_list_empty' => 'Nobody has dared to comment on this article...yet', 'comments_empty' => 'Are you sure you want to be the first to comment?' ); $blog = $modules->get("MarkupBlog"); $renderComments = $blog->renderComments($page->blog_comments, 0, $options); $content = $blog->renderPosts($page) . $renderComments; echo $content;
-
Process module with certain permission not showing up
kongondo replied to owzim's topic in Module/Plugin Development
Got to the bottom of this (I think). Let's say I have a module called ProcessMyModule that has a page called myModulePage that uses the template admin and has the parent admin. That module will display just fine in the admin menu and be visible to users with the permission attached to ProcessMyModule If I add a child page to the page myModulePage, say, myModulePageChild, that uses a template abc, my ProcessMyModule will disappear from the admin menu. The only way to get it back is to (i) enable 'view and edit access' in the template 'abc' [the Access Tab], and (ii) ensure that 'abc' has a template file. So, in my case, the reasons why my ProcessModule was not visible in the admin menu is because its admin page has child pages and those child pages had a template without a template file + without 'view-edit' access enabled.The same thing happens with ProcessMenuBuilder since its admin page has child pages. In the case of ProcessBlog though, its page has no child pages, hence works fine. -
Process module with certain permission not showing up
kongondo replied to owzim's topic in Module/Plugin Development
In my case there are no typos. If I change the parent of the process module to be 'setup', it shows up under setup menu. If I change its parent back to 'admin', it doesn't appear. Totally confounded by this one. I've cleared cache and all... -
Update: Merged dev 2.3.6 to master. This version makes it possible to use CKEditor to create Quick Posts
-
Process module with certain permission not showing up
kongondo replied to owzim's topic in Module/Plugin Development
Ha...I had the exact same question . A process module I am working on is not appearing in the menu, even when I remove a permissions requirement. It works practically the same as my ProcessBlog module, the only difference being that Blog shows up in the Admin menu for users with role 'blog' but in the case of this other module, similar to your case, the module doesn't show up in the Admin menu! -
ProcessWire ApiGen (dynamic + up to date + all branches)
kongondo replied to kongondo's topic in API & Templates
And we are all up . Initial versions of dev and devns are both up now. Don't worry, I won't be giving a running commentary every week! Needed to test that everything works smoothly and so far no hiccups. -
ProcessWire ApiGen (dynamic + up to date + all branches)
kongondo replied to kongondo's topic in API & Templates
In case you haven't noticed, you can shift+click to select a block of code lines, or ctrl+click to select multiple lines. Also, the left side menu just doesn't list the classes, but functions and interfaces as well. Really cool. I have been trying to find a way of displaying the full version numbers of each branch with the docs but haven't found way. For now, if you want to know the version, just scroll or search for the Class ProcessWire. and look at the constants summary table. -
ProcessWire ApiGen (dynamic + up to date + all branches)
kongondo replied to kongondo's topic in API & Templates
Update: Theme Switcher + remake of dark theme OK, because you all asked nicely, and because I don't want @teppo's eyes aching (although he might have been looking at my theme through his cool sunglasses ) and because I don't want @horst to feel 'Ough', I have hurried this up . OK, jokes aside... Theme switcher now included (quite a trivial thing really). The default is the light theme that ships with APIGEN (actually, it also has a Bootstrap theme that it ships with). If you prefer the dark theme (I've gone easy on some colours), just click on the dark box. It will set a cookie and remember you...for a whole year!! If on the light theme, no cookies for you, sorry . When I get time I will write those EU cookie thingys. Something like 'if you are visiting me and would like to stay in a room surrounded by cool, then you must accept to eat my cookies! What do you mean you don't like my cookies? What's wrong with my cookies!? If you don't like my cookies then you stay in the light room'....OK, a bit OTT there (I had a WillyC moment, but failed miserably...am trying too hard, I know )... Btw, there's the occasional flash of 'light theme' when surfing using the dark theme. Am not too bothered about it so will let it be for now.. Anyway, update's here! Later.. -
@Tony, It seems you are using (or copied from) the demo template files that are optionally installed with Blog. In this particular case we are dealing with blog-post.php. The code that generates that sidebar is found between lines 24 - 35. The method spewing out the markup is renderNav() (line #35). As a quick btw, the general rule of thumb is rather than using CSS to hide markup, first check if it is possible not to output that markup in the first place . In our case, it is possible. Line #31 of the code is what is outputting the Author's name and URL. All you need to do is comment out that line, as well as earlier variables building up towards that code, i.e. lines 25 ($authorsURL), 27 ($authorURL) and line 28 ($authorName). I'm not sure you've seen my earlier posts about documentation (it is a long thread after all), but I used to have Blog's documentation hosted on my website, which is currently in deep hibernation until I get time to revive it. Thankfully, the good guys over at wayback machine archived my now asleep and offline website including all the Blog tutorials. These can be found here and the documentation for renderNav() is here. As you'll see, you can use renderNav() to output all sorts of stuff. Hope this helps
-
ProcessWire ApiGen (dynamic + up to date + all branches)
kongondo replied to kongondo's topic in API & Templates
It works just fine ...but not always as, .....erm, clearly stated here -
ProcessWire ApiGen (dynamic + up to date + all branches)
kongondo replied to kongondo's topic in API & Templates
Nice line about potential future changes. Added it to the readme The whites make my eyes ache . I'll look into setting up a theme switcher. -
I have started a project that fully automates the generation and regularly updating of ApiGen docs for all currently maintained ProcessWire branches...More info here
-
Managed to get round to this; fully auto-generated and regularly updated ApiGen docs for all currently maintained ProcessWire branches...More info here
-
Finally, I got spared some time to work on a project I have been meaning to do for a while. This follows on from this request and other discussions about the pros/cons of an ApiGen for ProcessWire. I am all for such docs as long as two conditions are met: (i) That it is clearly indicated who the target audience is; and (ii) that the docs are regularly updated. I think this project meets both. I have created a GitHub project and project pages for hosting regularly auto-updated PHP ApiGen Docs for ProcessWire 3 (master and dev) as well as ProcessWire 2.8 (master). We also have ProcessWire 2.7 (master and dev) docs but these are not updated since this version of ProcessWire is no longer active. The whole doc-generation process is automated including auto-pushing changes to GitHub. The current cycle is: ProcessWire 2.8.x Master branch docs: updated once at the beginning of every month ProcessWire 3.x Master branch: updated once at the beginning of every month ProcessWire 3.x Dev branch: updated once weekly, every Friday Docs are generated for all .php and .module files under /wire/core/ and /wire/modules/. Currently, this is all done via my home PC. I am on a Windows machine so nothing could really go wrong... . Barring the unforeseen, these docs should be roughly in step with the latest ProcessWire commits. Now running on a remote server. Tools used Windows PowerShell (move over wget! ) wget Git-Bash Windows Task Scheduler (there's your cron right there ) cron Pear APIGEN Scripts: PowerShell, Bash Script, VBS and Batch files A couple of stress balls I hacked together a dark theme for this project, sublime-text default look. The CSS still needs some work, all help appreciated, thanks. If anyone would like to create an alternative theme, we could incorporate a theme switcher. Feeback, thoughts, suggestions (e.g. text in READMe, etc)? Credits to Ryan for writing such well-commented code...otherwise this project would not have been possible. From the READMe
-
@Tom...looking forward to your mockups...
-
Crowdfunded Tinypng Integration Module
kongondo replied to OllieMackJames's topic in Module/Plugin Development
Just to qualify my question above, I'm just trying to think through the whole idea of 'crowd-funded' modules, since, IIRC, it is uncharted territory for us (although quite interesting). Just wondering if it is something we need to think through a bit more.?..or am just being too fussy. OK, back to my hiding place... -
Crowdfunded Tinypng Integration Module
kongondo replied to OllieMackJames's topic in Module/Plugin Development
Hmm, not so sure about that...Have a read here: Am I missing something? I read that as 'there is a web service' (see pricing at the bottom of that page) and an API that you can use separately? (hosted on GitHub) Edit: You are right @teppo, going by this WP plugin.... Edit 2: Practical question. Once the 'module' is completed by 'x'...who would maintain it? 'x' or the community? Is there a situation where 'x' would need to be 'compensated' for continuing to maintain a module on behalf of the community? Just wondering... -
Head over here and run the following code (pasting between the <?php ?> tags). Have a look at the output (underlying html) Is that what you are after? Note: this is pseudo-code. No image tags here. $tags here are equivalent to your $page->images. $tags = array('Bathroom', 'Gym Basement Loft', 'Home-Office Kitchen', 'Kitchen', 'Car', 'Gym'); $tagsArray = array(); $uniqueTags = array(); $out =''; $out .= "<ul>"; foreach ($tags as $tag) { $tagsArray = explode(' ', $tag); foreach ($tagsArray as $t) { if(in_array($t, $uniqueTags)) continue;// skip duplicate tags $out .= "<li data-uk-filter='{$t}'><a href='#'>{$t}</a></li>"; $uniqueTags[] = $t; } } $out .= "</ul>"; foreach ($tags as $tag) { $t = str_replace(' ', ', ', $tag);// our comma separated tags $out .= "<div data-uk-filter='{$t}'>" . "<a class='fancybox-portfolio port-item' href='url' rel='gallery1'>" . $tag . "</a>" . "</div>"; } echo $out; Alternative shorter code...looping 'once' $tags = array('Bathroom', 'Gym Basement Loft', 'Home-Office Kitchen', 'Kitchen', 'Car', 'Gym'); $tagsArray = array(); $uniqueTags = array(); $divs ='';// will hold the <div> $out =''; $out .= "<ul>"; foreach ($tags as $tag) { $tagsArray = explode(' ', $tag); $t = str_replace(' ', ', ', $tag); $divs .= "<div data-uk-filter='{$t}'>" . "<a class='fancybox-portfolio port-item' href='url' rel='gallery1'>" . $tag . "</a>" . "</div>"; foreach ($tagsArray as $t) { if(in_array($t, $uniqueTags)) continue;// skip duplicate tags $out .= "<li data-uk-filter='{$t}'><a href='#'>{$t}</a></li>"; $uniqueTags[] = $t; } } $out .= "</ul>" . $divs;
-
Peter, it can be done. There's nothing to prevent it from being done . Something is goofing your script somewhere. Either you are overwriting your output in the foreach loops or there is something else we can't see, given we are only seeing part of the code. I am finding it difficult to understand how the <div> are related to the <ul> (if at all). How should the end result look like on a single page? One list of <ul>,</ul> and several <div> one for each image on that page? May I also suggest that if you can, try not to echo stuff within code but save them to a variable, usually $out, concatenating stuff to that variable and finally when you are done with the code, to echo $out. It's just easier to follow what's going on that way. Back to your qn, if we can get a clearer picture of the end result, this can be resolved quickly, maybe even put up an example online on some PHP Fiddle..
-
@Peter, It won't work like that. In part 1, each tag is a separate <li>. In part 2, each group of tags has to be within one <div data-uk-filter> but comma-separated. Hence, what @Martijn has said, or my earlier example using implode... $commaTags = implode(', ', $uniqueTags); $out .= '<div data-uk-filter="' . $commaTags . '" >...</div>';// if continuing with the $out above echo $out; ...which I don't think will work in this case since you are doing a fresh foreach . So, go with @Martijn's Thumbs up for trying though Edit: Here's the full code just for completion...You might get a syntax error in there somewhere; I haven't fully checked things are properly closed.. foreach($page->images as $image){ $large = $image->width(800); $thumb = $image->size(380); echo " <div data-uk-filter=". (str_replace($image->tags, ' ', ', ')) . "> <a class=\"fancybox-portfolio port-item\" href=\"$image->url\" rel=\"gallery1\"> <img src=\"$thumb->url\" alt=\"$thumb->description\" class=\"portfolio-thumb\"> </a> </div>"; } What @Martijn's code is doing is searching for a double space in the $image->tags string and replacing that with a comma then a space, e.g. 'This is my tag' will become, 'This, is, my, tag';
-
<mod note> Hi @louisstephens, Please note that this forum (ProcessWire Support Forums → Community Support → Modules/Plugins) is a support board for existing modules only. If you your question is about module development, please use its sub-forum (ProcessWire Support Forums → Community Support → Modules/Plugins → Module/Plugin Development), If it's about a specific module and that module has its own support thread, please post your question in that thread (however long the thread might be (for now) - it will still be picked up). I am moving your thread to its appropriate forum. </mod note>