Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/14/2016 in all areas

  1. This topic will serve as the thread for the Selectize.js family of modules, which utilize this popular jQuery plugin for enhanced tagging of images, fields, templates and page selection in Processwire admin. http://selectize.github.io/selectize.js/ The modules will ultimately include: JquerySelectize Base module that provides the library for use by other modules Github: https://github.com/outflux3/JquerySelectize Modules: http://modules.processwire.com/modules/jquery-selectize/ ----- SelectizeTemplateFieldTags Uses the library to init the tags field on fields and templates, and makes the icon searchable by name. Github: https://github.com/outflux3/SelectizeTemplateFieldTags Modules: http://modules.processwire.com/modules/selectize-template-field-tags/ Screens: Tagging a template: *******sorry but the forum upgrade destroyed these images -- you need to click on them to see them now ******** Search icons by name and see the icon: ----- SelectizeImageTags Uses the library for image tags field. Github: https://github.com/outflux3/SelectizeImageTags Modules: http://modules.processwire.com/modules/selectize-image-tags/ Screen:
    11 points
  2. Time ago I needed something similar. I solved it with a small script. You may use it as a starting point: $media = wire('pages')->find('parent=1034,template=medium,include=all'); $media->sort('media_type,status,title'); foreach ($media->getValues() as $key => $medium) { $medium->of(false); $medium->sort = $key; $medium->save(); // var_dump($key.' - '.$medium->sort.' - '.$medium->media_type.' - '.$medium->title); }
    5 points
  3. If the order is your issue than use count() with those selectors, the current page num and some math to determine which pages are to be shown on the current page - then load just those. Edit: I've not tested it with real pages, but the test class seems to work correctly: https://github.com/LostKobrakai/Paginator
    4 points
  4. Also you might want to look into building a selector with arrays, since that is more readable. And if you only want to count the pages, you could also use the count method. That is blazing fast. We're calling more than 80 count method on one pageload searching around 40k pages and it is loads within 1 second.
    4 points
  5. You way does load all of those notes into memory even though only 15 are used later. Build your Selector first and then query the db for the total result.
    2 points
  6. Why don’t you do the three database finds after building the selector? I would imagine that to speed things up, because you won’t be loading as many pages just to throw them out later. Instead of slicing the PageArray you can also put limit and start into the selector like so "start={$start}, limit={$limit}". Edit: Actually, maybe I’m missing something, but it looks like you’re getting ALL horse-notes in $notes_other. I’m also pretty sure that PageArrays automatically filter out duplicates, so when you prepend the other two PageArrays, you’re not really doing anything.
    2 points
  7. Download the CKeditor plugin there : http://ckeditor.com/addon/bidi Extract the BiDi folder into your /site/modules/InputfieldCKEditor/plugins/ Enable Plugin in Fieldsettings of the TextareaField under the Input Tab -> Plugins (checkbox) In CKEditor Settings -> CKEditor Toolbar, add this line : BidiLtr, BidiRtl, Language Now you have three new buttons refs: http://ckeditor.com/addon/bidi https://processwire.com/talk/topic/13468-colors-in-ckeditor/?p=121563
    2 points
  8. Hey there, I am using PW for more than two years now and it satisfied me in all scales. Can just say: Build Bigger, Faster, Stronger, Easier. Now we are up to make a site for refugees also in arabic and farsi. Frontend is no problem, but how to make the Textarea/CK Editor Right to Left for Arabic? … and/or custom Css to the Languages - is there a proper way? Thx, Tom
    1 point
  9. I think the admin is meant to be used on desktop but I'll see if there's an easy fix to this, maybe setting height: auto or similar is enough. Could you show an example scenario where this happens? (what field to add with what settings) Edit: try adding this to AdminOnSteroids.css and see if it helps: .maxColHeightSpacer { display: none; }
    1 point
  10. Yes that worked, adrian. Thanks and sorry for overlooking that section.
    1 point
  11. cool - thanks, this works well! Now i just have to figure out how to update the sort on the pagetable for the parent page... Edit: was simple, just need to sort the pagetable field on the runtime/temp property... awesome
    1 point
  12. It is a good question. In a good world you can use the dir="rtl" on a HTML element [click for more info]. But, to have it on the PW backend... --- A temporary and poor "solution" would be to add dir="rtl" to the HTML tag of the theme you are using on the backend, resulting in a page with full RTL direction. <!DOCTYPE html> <html dir="rtl" lang="ar"> <head> <meta charset="utf-8"> ... I tested it on the RenoAdminTheme, its a pain, as the css is not set to be RTL but it work on Textfield & co. Feel free to test it on other themes if it fit your needs - until we get better answer . @Tom : which backend theme are you using ?
    1 point
  13. ProcessWire trims and escapes selector values, so this doesn’t seem possible with pure PW selectors. You may try something like this… $query = wire('database')->prepare('SELECT pages_id FROM field_postcode WHERE data like concat(:areacode, " %")'); $query->bindValue(':areacode', 'A1', PDO::PARAM_STR); $pages->executeQuery($query); $results = $query->fetchAll(PDO::FETCH_COLUMN); $pages_matching_ = $pages->getById($results);
    1 point
  14. I’m not on 3.0, but I figured I’d just swap out the function and it’s working fine. Users still won’t show up even if you’re allowed to edit them, but that seems to be a separate issue I opened on GitHub.
    1 point
  15. There's no support for (mysql) date functions in the selector engine. You need to go this way: $startOfYear = mktime(0,0,0,1,1,date('Y')); $endOfYear = mktime(23,59,59,31,12,date('Y')); $pages->find("…, article_detail_date>=$startOfYear, article_detail_date<=$endOfYear");
    1 point
  16. Your set lifespan for the cachefiles has nothing to do with the expire dates of the report. In ProCache settings on the TAB GZIP-More there is a link to a sample part of the htaccess addition: Place the contents of this file... Copy the content and place it at the beginning of your htaccess. That's it.
    1 point
  17. 1 point
  18. The issue is solved. I can't exactly tell what solved it, but i created a new image field, checked the thumbnail view button, and it worked perfectly. Then i disabled the thumbnail view of the field that caused the problem, tested it, then enabled it again, and now the thumbnail preview seems to work.
    1 point
  19. Ok, the latest version comes with the new Console panel that I introduced a few posts back. Here are the key points/features on this panel: Has full access to all PW variables: $pages, $page, $user, etc Works really nicely with fl() calls, but you can also make use of d(), l(), or even simply echo() All output is generated via ajax, and so is virtually instant No need for editing a template file and reloading the page in browser - simply type your code in the console panel for an instant result Only available to superusers Caches code in the filesystem so it stored between page reloads, navigation to other pages, and even browser restarts Note that for those of you upgrading you will need to install the new Process Tracy Console module that is now included. For new installs, this will be installed automatically with the main module. Remember that this allows you to run any PHP code, so be careful! Please let me know what you think. Here are some example calls and their results:
    1 point
  20. HELLO! Finished a simple Artist Profile for Processwire similar in scope to Indexhibit. On github: https://github.com/benbyford/artist-profile Demo: http://artist.nicegrp.com/
    1 point
  21. I think there is still an outstanding bug (https://github.com/ryancramerdesign/ProcessWire/issues/1803) with images on user pages - it seems like outputformatting is always off which results in the need for first(), even when maxFiles is set to 1. Try this: $user_image->first()->url
    1 point
  22. edit u. index.php file + add 2 top on.line afters namespace $_SERVER['REQUEST_URI']=str_replace('index.php','',$_SERVER['REQUEST_URI']); when.u no needs index.html no more rember to deletex that ok
    1 point
  23. And here's some code for those that may need it: $myfieldset_start = false; foreach ($page->template->fields as $field) { // or something like $this->templates->get('templatename')->fields if ($field->name == 'myfield') { // opening element of a fieldset is just the field name you gave it $myfieldset_start = true; } elseif ($field->name == 'myfield_END') { // ending element is field name with _END on it - break out of the loop if we reach this break; } elseif ($myfieldset_start == 'true') { // otherwise we are iterating fields in the chosen fieldset so do what you like here echo $field . "<br>"; } }
    1 point
  24. 1 point
×
×
  • Create New...