Jump to content

PWaddict

Members
  • Posts

    926
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by PWaddict

  1. The module injects broken links. My main localhost url is: http://localhost/mysite.com/ and the module injects the css link as: <link type='text/css' href='/site/templates/AdminCustomFiles/ProcessPageEdit.css' rel='stylesheet' /> where the correct one should be: <link type='text/css' href='/mysite.com/site/templates/AdminCustomFiles/ProcessPageEdit.css' rel='stylesheet' />
  2. Has anyone managed to hide the Crop button? I tried with Admin Custom Files but with no success. EDIT: Ok I did it with Admin Custom Files.
  3. I'm trying to hide the Crop button from the Croppable Image 3 module with no success. Has anyone managed to hide it?
  4. Thanks to your suggestions I finally figured out the problem. I had to replace the % on map's css to px.
  5. I've copied my code from an older website I've created a map with changed colors without using the module and it doesn't even load the map on the website I'm currently developing. It's driving me crazy... window.onload = function () { var latlng = new google.maps.LatLng(12.3456789, 12.3456789); var styles = [ { "stylers": [ { "hue": "#c1d72e" } ] } ]; var myOptions = { zoom: 17, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP, disableDefaultUI: true, styles: styles }; map = new google.maps.Map(document.getElementById('map'), myOptions); var myCenter = new google.maps.LatLng(12.3456789, 12.3456789); var myIcon = new google.maps.MarkerImage( "https://chart.googleapis.com/chart?chst=d_map_pin_letter&chld=%E2%80%A2|c1d72e", new google.maps.Size(24,30), new google.maps.Point(0,0), new google.maps.Point(12,23) ); var marker = new google.maps.Marker({position: myCenter, icon: myIcon, map: map}); On the 2nd method you proposed I don't know how to apply the code to change the color. If anyone managed to change the colors with this module PLEASE let me know how you dit it. Thanks.
  6. Yeah I know it's possible. I've already did on a map without using this module. I should be more specific. On a map without using this module I used this js to change the colors: var styles = [ { "stylers": [ { "hue": "#c1d72e" } ] } ]; So the proper question is how can I apply the above code on a map using this module?
  7. Is it possbile to change the colors of the map?
  8. To quickly fix the issue just replace the below code from TextformatterVideoEmbedOptions.config.json "yt_showinfo": { "type": null, "value": 0, "label":"YouTube: Show Info", "description":"Supported values are 0 and 1.", "notes": "Default: 0" } to this: "yt_showinfo": { "type": null, "value": 1, "label":"YouTube: Show Info", "description":"Supported values are 0 and 1.", "notes": "Default: 1" }
  9. I found another problem. ProcessWire doesn't display the correct version of your module. It keeps saying that I have 0.2.7 and that there is a newer version 0.3.3 which is false cause I already have the latest module version installed. I opened the module file to confirm that: 'version' => 033. Please fix that too.
  10. The YouTube: Show Info field is broken. When the value is 0 it doesn't add the parameter: &showinfo=0 at the video url to hide the info but if the value is changed to 1 then it adds &showinfo=1 on the url which is useless cause YouTube shows info by default. Please fix it.
  11. I've used the above module to hide specific children pages with the template selector: I've changed this line: if($p->parent->name != 'visitenkarte') continue; to this: if($p->template->name != 'tour-content') continue; and it partially works cause ProcessWire remembers what pages you click lately and if those pages have children and you reload the page that holds the page tree then all the children pages you want to hide are visible. Do you know how to fix this? EDIT: Nevermind, no longer need to hide them but if you know how to fix that problem maybe you should share it for other users.
  12. I figured it out. I changed this function: public function afterBuildForm(HookEvent $event){ if($this->user->isSuperuser()) return; $form = $event->return; foreach($this->data['viewTabs'] as $tab) { if(!$this->user->hasPermission("tab-".strtolower($tab)."-view")) { $this->removeTabs($tab, $event); } } foreach($this->data['hideTabs'] as $tab) { if($this->user->hasPermission("tab-".strtolower($tab)."-hide")) { $this->removeTabs($tab, $event); } } $event->return = $form; } to this: public function afterBuildForm(HookEvent $event){ if($this->user->isSuperuser()) return; $form = $event->return; $p = $event->object->getPage(); foreach($this->data['viewTabs'] as $tab) { if(!$this->user->hasPermission("tab-".strtolower($tab)."-view")) { $this->removeTabs($tab, $event); } } foreach($this->data['hideTabs'] as $tab) { if($this->user->hasPermission("tab-".strtolower($tab)."-hide") && $p->template->name == 'mytemplatename') { $this->removeTabs($tab, $event); } } $event->return = $form; }
  13. Sorry you're right I've edited the function removeTabs: public function removeTabs ($tab, $event) { $form = $event->return; $p = $event->object->getPage(); if($p->template->name == 'mytemplatename' && $tab == "Children") { $fieldset = $form->find("id=ProcessPageEdit".$tab)->first(); } else { $fieldset = $form->find("id=ProcessPageEdit".$tab); } $form->remove($fieldset); $event->object->removeTab("ProcessPageEdit".$tab); }
  14. Ok I hide the children tab on the template I wanted but now the order of tabs is changed on the other templates. It shows them in this order: Content, Settings, Delete, View, Children instead of Content, Children, Settings, Delete, View. I'm not sure how can I fix that.
  15. Ok thanks I will check them out.
  16. I've just installed the module. Isn't possible to hide the children tab ONLY on a specific template?
  17. I removed the "new" button not the edit one. Clients edit what they see in front of them so I doubt they will try to find that specific "new" url and enter it manually instead of just going to the PageTable page. I will also use your Restrict Tab View module to hide the children tab to avoid adding pages from there too. Do you know if it's possible to also prevent loading the children pages on the page tree from that specific parent? The client should be able to see the total number of children pages next to it's parent but when they click on that parent it will NOT load the children pages.
  18. So I guess the only option is this but unfortunately I don't have the knowledge to do that hooking. Can you help if it's easy for you? All I want is to remove the "New" button from a specific page id.
  19. But if it moved under the Admin branch the urls of the pages created via PageTable will include the /admin/ or no?
  20. I would like the site editor to be able to add children pages on specific page ONLY through Page Table instead of using the "New" button next to the parent page. Is this possible?
  21. How can I display on the backend the pages created with this module as titles instead of names? For example I'm currently see the pages as: test-30-jan-2017. How can I see them as: Test 30 Jan 2017? Sorry that was my mistake.
  22. I display a button ONLY if there are more than 3 children on a specific template. So, I'm doing this: $posts = $pages->find('template=posts-content'); if(count($posts) > 3) { echo "Button"; } On some point that template will have hundreds of children. Is the above method ok or should I use findMany? $posts = $pages->findMany('template=posts-content'); if(count($posts) > 3) { echo "Button"; } or is it better to just use a limit on the selector? $posts = $pages->find('template=posts-content, limit=4'); if(count($posts) > 3) { echo "Button"; }
×
×
  • Create New...