Jump to content

Soma

Moderators
  • Posts

    6,798
  • Joined

  • Last visited

  • Days Won

    158

Everything posted by Soma

  1. Just fixed minor issues Ryan mentioned and commited to github. Thanks
  2. Ohhh thanks Ryan, I already thought I was crazy. I wasn't sure and I tested this today before and it suddenly worked. Didn't know you fixed it already!
  3. Thanks Ryan. Glad you like it. This theme was designed with the intention to use it for our client projects. Yes the pulldowns were mentioned already in the forums. I did include a lightweight jquery plugin "droppy" to do the effect. It's a nice little script I used in several project and adapted some time ago with more options for different functions. I also combine it with the jquery hoverintent plugin to make it sensitive and not open when quickly moving mouse over the navigation. See my fork of the droppy plugin: https://github.com/somatonic/droppy Yeah the first was intentional, but I removed it. The asmselect, I don't know what exactly you meant, but I recognized a last minute change I did, it would display the dragged list item green font with blue background. I fixed that too. Yeah there's definately room for some features. Also remember the "image" type label I hacked the pagelist module for my moms gallery? It would definately help to be able to specify a icon per template, to make it more clear to the user what type of "page" this is. That would be welcome. While at it. I thought while designing this themes, there's some labeling of buttons like "save page" that needs to be reconsidered. The therm "page" as I know is meant more abstract, but that will definately confuse users, as the "page" he's editing is more like a object or image of a gallery... May just use things like "save". How are you thinking about this, as you're on the localisation of the admin? Will there be possibility to rename also the Admin Pages names? As they're not changeable atm. Also I was wondering why custom templates can't be renamed in PW?
  4. there was the same problem already, may have a search in the forums... ;D http://processwire.com/talk/index.php/topic,33.0.html
  5. Well I found the issue on another installation. The include path of the topnav somehow was different from the default admin template. I got : <ul id='topnav' class='nav droppy'> <?php include($config->urls->templatesAdmin . "topnav.inc"); ?> </ul> instead of <ul id='topnav' class='nav droppy'> <?php include($config->paths->templatesAdmin . "topnav.inc"); ?> </ul> Wonders how this doesn't cause an error on my local test server, but on the live server. Anyway it's fixed and checked in on github. Thanks for finding it.
  6. Thanks guys, just fixed the search option form and submited on github. As for the error, sevarf2 I can't reproduce this. I see you put the templates-admin into the wire folder. Well. it's supposed to be in the site folder. Well I changed something in the topnav.inc to render the submenus, could possibly have missed something, anyone get the same error?
  7. I'm working on a new smoth admin theme for ProcessWire2 kinda based on my DarkNight theme but for working at day . Teflon admin theme has pulldown menus, fixed header, fixed top submit button on pages. Download from github: https://github.com/s...admin-theme-pw2 Tested on Chrome,FF,Safari, IE. Latest screenshot:
  8. But now I got a problem with portrait images, it does stretch the image and it does not keep ratio when entering. It works with landscape images. Also the number fields are to small, last number get cut when 4 digits.
  9. DOn't worry, it was my theme causing the issue.. played around a little last time. Now it works.
  10. that's exactly what I do, but it get stretched after open again... cleared all cache and reloaded frame.
  11. Finally! Thanks Ryan, that was it right there. Ii knew it must be a bug. I tried something with setting width and height but no luck with JS. Now testing I found a bug, when I resize a image to let's say 200x150 and insert then open again it gets stretched to 934x150... But this is a nice feature having int input fields, the resize handle is barely visible anyway and kind wacky to use.
  12. May deinstall all custom modules? While at it, this is hard to see from the admin modules page. which are custom and which permanent or system related... any chance to improve that a little?
  13. ah so you got a multiple images field and adding a single one? try to make it an array: $cover= array($item->LargeImage->URL);
  14. I assume you wan't this in the admin. (If front-end based profile pages , this could be quite different.) There's possibility to create templates and add a for example "client" role to view and edit pages with the template. Not quiet there but we'll get there.... Now create and add page reference field "editablepages" (from the example code) to the "user" system template to be able to select pages you want the user to edit exclusively. If you make it recursive (see below) you will only need to select the top parent page of where the user has his pages and be done, all child pages will be editable. To get this working, you need to create a module to hook into the editable method of Page class. Following is an example module code I created adapted from one of Ryan's example here in the forum. It checks recursively (remove foreach parent check to only have the single pages editable) up the parent of the current page if found a selected page the user has in his profile it's editable. This doesn't work with viewing. But not sure yet if this even possible. You could also consider creating custom admin page for only seeing the pages the user can edit. Depends on how fit you're with the system and php, this might help you getting started. I'm not sure there's more possibilities. But Ryan will surely be helpful too. see also this forum entry from where I got this far: http://processwire.com/talk/index.php/topic,258.0.html <?php class AccessPageEdit extends WireData implements Module{ public static function getModuleInfo() { return array( 'title' => 'Access Control Page Edit', 'summary' => 'Control who can edit what page. If installed, create a inputfieldtype of page to select from site tree and add it to user template. Select page(s) to be edited', 'version' => 001, 'permanent' => false, 'autoload' => true, 'singular' => true, ); } public function init() { if($this->user->hasRole("client")) $this->addHookAfter("Page::editable", $this, 'checkpermission'); if($this->user->hasRole("client")) $this->addHookAfter("Page::addable", $this, 'checkpermission'); //if($this->user->hasRole("client")) $this->addHookAfter("Page::viewable", $this, 'checkpermission'); } public function checkpermission(HookEvent $event) { // if it was already determined they don't have access, then abort if(!$event->return) return; $page = $event->object; $parents = $page->parents; // run check for parent pages and allow recursive inherit access foreach($parents as $p){ if($this->user->editablepages->has($p)) return true; } // then run check on selected single pages if(!$this->user->editablepages->has($page)) $event->return = false; } } ?>
  15. and save mode? or can you provide more details and code what you're trying to do? or could it be that some images are JPG JPEG ? or something like this?
  16. don't know really. does your php setting allow allow_url_fopen? or is save mode on? in case this kind of import from external url wouldn't work.
  17. could it be that jpg isn't entered in the image field setting? are you importing them from external website or url?
  18. it should be "". '' only enters strings "" is different, it parses variables and makes \n newlines foreach ($autori as $autore){ $lineautori .= $autore."\n"; }
  19. just checked: you should be able to compare $user->pass->matches('string'); returns true if it matches.
  20. sorry I confused something... I meant decrypted, but that's false anyway. have a look at FieldtypePassword.module ...
  21. Have you tried $user->pass for getting the current passwort and compare? $user->pass returns encrypted password.
  22. I spotted something strange. I created a custom admin page and have a Process module to render certain pages in a admin data table. So far it works, but for the image on those pages I got problems. $p->image->url(); wouldn't work, even though it is a single image inputfield (1) , I have to use $p->image->first()->url to get it working. Is this a bug? Module code: <?php class ProcessBilder extends Process { protected $selLimit = 'template=bild, sort=-created, limit=50, include=all'; protected $selAll = 'template=bild, sort=-created, include=all'; public static function getModuleInfo() { return array( 'title' => 'Bilder', 'summary' => 'Page to manage Galerie Images', 'version' => 001, ); } public function ___execute() { $out = ''; $table = $this->modules->get('MarkupAdminDataTable'); $table->setSortable(true); $table->setEncodeEntities(false); $header = array('Bild','Title','Status','created','usermodified'); $table->headerRow($header); $rows = array(); $pageArr = $this->pages->get('/bilder/')->find($this->selLimit); foreach($pageArr as $p){ $editUrl = "{$this->config->urls->admin}page/edit/?id={$p->id}"; $img = $p->image->first()->size(0,100)->url(); // $p->image->url() throws error... $rows[] = "<img src=".$img." />"; $rows[] = $p->editable() ? "<a href='{$editUrl}'>".$p->get('title|name|id').'</a>' : $p->get('title|name|id'); $rows[] = $p->status; $rows[] = date('Y.m.d H:i:s',$p->created); $rows[] = $p->modifiedUser->name; $table->row($rows); $rows = null; } $button = $this->modules->get('InputfieldButton'); $button->value = 'Create New'; $button->href = "{$this->config->urls->admin}page/add/?parent_id=1001"; $button->class .= ' align_right'; $pager = $this->getTotal() > count($pageArr) ? $pageArr->renderPager() : ''; $out = '<p style="overflow:hidden">' . $button->render() . '</p>' . $pager . $table->render() . $pager . '<p style="overflow:hidden">' . $button->render() . '</p>'; return $out; }
  23. Just testing this cache for first time. It doesn't really save any chache files for me so far except for 1 case where I edited a summary of a page and there was a .cache file saved. Folders are generated but no .cache file. What's going on? ... just noticed that I wasn't really paying attention that it has option "for guest users" ... ... now it's flowing.
  24. Just brillant! Thanks for integrating this awesome options ;D
  25. hehe sorry for keeping you away from sleeping... ;D we all suffer on the same
×
×
  • Create New...