Jump to content

OLSA

Members
  • Posts

    151
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by OLSA

  1. Thanks @tpr 1. yes I know for that and problem is, after that setup, to change order in some cases - drag and drop ("Your sort was not saved because these pages are automatically sorted by -created."). And that is clear to me, but want to get default sort option by last added page on top of the first page, but with option to change order. 2. yes that is solution, and thanks for that (it is completely ok) 3. I was not paying attention in that setup - but also will try to find solution to change date format, and like to add some different CSS style
  2. Hello for all, I am registered here more than 2 years, but because I was deep in Joomla (for every project write custom components, modules and plugins) I was in doubt to leave or not Joomla and start to work with ProcessWire. After all, last month finished 2 small websites in PW and it was like a game - wonderful experience. After that decided to move all my sites to PW, and there are problems with first bigger website. I start to move website with about 2000 pages (documents, news, events, gallery...) from Joomla to PW. Create content structure on PW side, write scripts to copy content and files, and everything finished without any problem. 1. Problem is that "news" category has about 700 pages (last 10 years content) and in admin pages tree, after submit new post, need to press page "14" and there find that new post. I read this, and found that there is no simple option to filter list - view - by "created" - or there is option inside template options - but in that case we lose "move" option. Also I know for top-menu option and "Pages/Recent/Created" but because of my clients, want to get that part similar like they get in Joomla backend (recent pages are on the first page in list, but also there is option to change order). 2. Another part is when need to link to some page from CK editor (link option) is any chance to get some filter or search for pages in pop-up window. EDIT: I was looking for answer in different direction, but input search field in pop-up window is completely ok for this problem (thanks @tpr) 3. Third question is to get option for truncate titles in pages tree with the addition date created? Please note, that I don't ask code solution for my problems, great help would be - idea - or what will be a PW "way to go" to solve all this tasks? Thanks, Sasa
  3. Hello, maybe it's better this way foreach($products as $product){ if($product->images){// <- this check $img_src = $product->images->first(); // <- and this line echo $img_src; echo $img_src->url; echo $img_src->size(300, 300)->url; } /** Let's see what pages don't have the images field set to anything **/ else{ echo "<br/> The page " . $product->name . " doesn't have the images field set to anything. <br/>"; } } regards
  4. @diogo thanks for reply. Yes, I call that "category" option and probably go with that (category alias would be "en" to get url www.site.com/en/***). In that case, "Tools" page would have some duplicated child pages/"switches" ("tags", "tags-english", "archive", "archive-english"...) - but that is that, and that's ok. p.s. also I was thinking to go with standard PW multilanguage concept and create redirection (somehow??? eg. header(...)) to home page if "$content" empty (case when there is no translation), and also create button in administration with action "show/hide English tab" - but problem is that there is many independent pages (no 1:1)
  5. @pwired thanks for reply, but sorry because my question was not so clear, sorry for that (just edited). Yes I know about Pencil, Balsamiq and others mockup tools, but my question is in another direction - how to get better administration user interface, what concept to use? Also there is no hard connection between posts/articles in default and additional language. Additional language content is almost independent. regards
  6. Hello for all, I need to create multilanguage website for non-profit organisation. "Problem" is that ratio between number of pages for default and additional language is about 10:1 because additional content is only for representation (summary of organisation activities with max. frequency of administration 1 per month). Currently there is only 1 additional language (default + english), and probably there would not be any changes in the future. Only what I want is to get much as possible cleaner administration user interface becuse of relatively complex content structure (deep categorisation, featured content, document management, front permissions, related content, events, galleries, archive, tags...). One idea is to avoid standard PW multilanguage concept and use "category" for additional language (understand that in that case need to use "hard coded" queries). Another option can be multiple PW installation but I don't like that because of shared files (images, pdf files), and common content blocks/widgets (galleries...). Additional language content (almost in >75%) is not in direct relation with default language content (like multisite variant, but with common templates, images, documents, media files etc.). Please, what is your suggestion about that website structure organisation? Thanks, Sasa
  7. Hello, in PW I really like possibility to dynamic resize images in template, but also maybe - one day - there can be and option for multiple thumbnails creation over upload process. Also in some cases cron jobs (background server scheduled tasks) are solution. regards, Sasa
  8. Hello for all, not sure can my suggestion help (I am still new in PW world ), but had experiences in other systems. When I need to create multi-relations I also use tagging ("tags"). In that case you get new relations (eg. have categories, but categories + tags can give you almost unlimited options). Maybe you can try that option? regards, Sasa
  9. No Pete, flash is just one of options (eg. if browser doesn't support html5). Here on this link you can test various runtime options (link). From Github (link): "Plupload is JavaScript API for building file uploaders. It supports multiple file selection, file filtering, chunked upload, client side image downsizing and when necessary can fallback to alternative runtimes, like Flash and Silverlight." EDIT: Now I am reading my posts and it's looks like I am an Plupload advocate - NO I am not. This is interesting topic and only what I want is to recommend it because I have positive experiences with it. It was ~30 min. job for integration in my project, and all that works without any problems. Also it is widely used by Drupal, Wordpress, Django... developers, old project, open source... And about Flash/Silverlight - on developer side is to allow or not support for that (script configuration) . That's it. I promise that I will no more talk about Pxxxx Thanks to HTML5, we can exclude Flash/Silverlight/Java technologies and use only javacsript + HTML5 to get all that magic on client side (canvas object for image resize, "multiple" for simple multiple file selection). regrads
  10. Hello Pete, I made custom Media manager for Joomla 3 and there used Plupload javascript library for upload process. Also have some clients where they uploads >20 of large images at once (cheap shared hosting). Here is link with few images (upload process, and resized images after uploads). regards, Sasa
  11. I found temporary solution and that is in connection with JSON response (because of that uploads stop at ~ 80 - 99 percent and can't finished). Very important part is that I have this problem (in admin/back-end) when debugging mode is switched on: // site/config.php $config->debug = true; Or, if debug mode is off everything works fine - no problem when PW api need to resize uploaded image. But, because debug mode is ON, in JSON response (only there) I have also details: Permission denied in ***\wire\core\Functions.php on line 254 Undefined variable: pathname in ***\wire\core\WireTempDir.php on line 170 Result of that is javascript error (strange JSON response) and "view" part is "incomplete" (progress bar stopped, and image doesn't show). Currently my temporary solution for this (Windows) problem are two simple steps: 1. wire/core/Functions.php, function wireRmdir(), at the end add something what I don't like to use, but it's works - "@" error control operator // wire/core/Functions.php // function wireRmdir() // line 254 return @rmdir($path); 2. wire/core/WireTempDir.php, function remove(), define $pathname // wire/core/WireTempDir.php // function remove() // line below 134 $pathname = ''; Windows, wamp, PW 2.5.29 - debug mode ON - backend - problem to upload images wider than "Max width for uploaded images" Regards, Sasa
  12. Hello, I have strange problem on local server (wamp, PHP 5.4.1) and PW 2.5.29 dev with image uploads. If I set maximum width for that image field then I can't upload images wider than that value ( > max.width). Example set max. width to 1200px, then 1200px go ok without problems, but 1201px (exactly) - upload process stop at ~85 - 99 percent. Same thing happened if I set max. width to eg. 460px and try to upload 600px wide image (80KB), stop at 85 percent. Debug mode is on, but can't find any error except inside Firebug (POST) or inside wamp PHP error log get "warnings" and "notice" about: Permission denied in ***\wire\core\Functions.php on line 254 Undefined variable: pathname in ***\wire\core\WireTempDir.php on line 170 Also on the same server I have no problems with other sites on PW 2.5.3 master. I try to find solution for that problem but without success (because it's on Windows I suspect that "handler" seems to remain open, or problems with path "\\" vs "/"..., but without succes inside Functions.php and wireRmdir() ). Please have you some idea how to fix that? Regards, Sasa
  13. Yes and thanks for this, because that's help me. What I want is that widgets (partials) need to be last in processing - and - widget can be any kind of content type (template). Also, I know that all this can be done using some checks (function) and with known path to some partial (eg. $config->paths->templates . "banner.php" ) - but I want flexible principle inside main layout template file, and use at least possible logic for that job (later some new partials can be easily added to some new pages - without coding). And @ Jan Romer, in my case _main.php is appended, and because I neglected that very important part - I get website loading problem. Finally I solve my problem when added 'appendFile'=>null to render() options. // _main.php // main layout template file // appended $widgets = $page->widgets; if(!$widgets || !count($widgets)) $widgets = $homepage->widgets; foreach($widgets as $widget) { echo $widget->render('', ['appendFile'=>null]); //'appendFile'=>null } With this I get desired result, very simple can add different content type widgets (partials, banners) to different pages. Best regards and thanks!
  14. Yes, that is what I done, sorry if I was not clear enough in my first post.
  15. I get totally strange behavior with website loading, and at some moments I get this error inside error. log: "Maximum function nesting level of '100' reached, aborting! (line 733 of ......wire\core\Page.php)" I tried to change limit to 200, and also disable xdebug, but that didn't solve my problem. I will try to find some different approach to get selectable widgets inside pages/templates (try to avoid render() method). Thanks.
  16. @Macrura thanks for answer, but Yes I have template file for every widget type (eg. banner.php), and parrent page (Widgets) use template but without file (just like Widgets inside "Blogprofile").
  17. Hello for all, I try to find solution for my problem but without success. I want to create selectable "widgets" option (banners) inside pages, and for that try to use Ryan "Blogprofile" principle: 1. create page widgets (hidden) with blank ("no file") template 2. inside page Widgets, child pages are different type of content (image+link, text box with some link, link lists etc...) 3. every "banner" has it's own template with markup Inside Home page I created page field type (asmSelect) and set that selectable parent template is "widgets". And all that works, no any problems with administration - I can select desired widget/banner. Because some desired eg. "Home" page doesn't know what kind of content is some widget (image+link, or text box with link, some list etc...) I use this in _main.php // _main.php $widgets = $page->widgets; if(!$widgets || !count($widgets)) $widgets = $homepage->widgets; foreach($widgets as $widget) { echo $widget->render(); // echo $widget shows correct ID } And some "banner" inside banner template has this (example): // banner.php $out = "<h4>{$page->title}</h4>"; echo $out; But I have problem that page (website) not load? Inside errors log ("site/assets/logs") I don't have any problem, everything is clean. My opinion is that I don't use correctly render() method??? My template structure is like latest PW (2.5.3) multilanguage profile. Thanks for any help.
  18. No need for that - in my case parent page is "News", and children are news articles. In menu I have "News" button but don't want to show news articles in submenu. Just add to parent ("News") check field and it's simple to skip childrens from submenu inside navigation loop. Option with eg. "skiper" check field is that you can use it also on others templates and don't need to edit php. Yes that is my option - but I use it different . Sorry for missunderstanding - I wasn't so clear in my previous post. In my case (hide children from submenu and also use parent for "listing" view) working solution is this: add simple check field in parent page and iniside navigation loop (where is children rendering part) ask "if that parent has check field checked" skip children and go to next. Also same method is for any other page what you want to hide from navigation - only different is place and/or "question" inside navigation loop. regards
  19. Hello, I created check field "skiper" and put it to template. In parent page set it ("check") and later inside navigation loop check if 1 - skip children (hide all of them from menu/submenu). // rendering submenu items if ( $item->hasChildren() && $item <> $homepage && !$item->skiper ) { echo treeMenu (....); } In that way user only need to do one setup, only inside parent page. Regards. p.s. sorry if this is not a way to go - today make first steps with PW
  20. OLSA

    Dancing Bear Music

    Congratulations Joss! I like content - "Content is king"... especially instrumental at "7" o'clock (.../instrumental-show-reel) with harmonica.
  21. This site is very, very good with nice design. I saw that you integrated and segment.io service, content is compressed, response fast etc... Congratulations!
  22. @Mike Very pro and clean!
×
×
  • Create New...