Jump to content

Valery

Members
  • Content Count

    121
  • Joined

  • Last visited

  • Days Won

    1

Valery last won the day on May 8 2014

Valery had the most liked content!

Community Reputation

89 Excellent

About Valery

  • Rank
    Sr. Member

Profile Information

  • Gender
    Male
  • Location
    Saint-Petersburg, Russia

Recent Profile Visitors

5,822 profile views
  1. Thank you, Robin S! That was exactly what I was looking for 👍
  2. Hello everybody! One of my clients seems to be using the extra page actions a lot, and he is rather that they are visible to him without clicking the "extras" icon (">") to expand. So I decided I'd throw a couple of hooks to add some extra page actions to the regular page actions, so that they become instantly accessible without the need to expand the extras. Here's a fragment of code from my /site/ready.php I was trying to use a global variable to store the extra actions array but I don't seem to be able to use it in the second hook. /* * A couple of hooks to add p
  3. Hey there! While not a part of PW, you might want to check out htmLawed, an advanced HTML filter/purifier.
  4. Hi! Will "Show this field only if" condition work for you? You could specify an id of a page on which you would like your field to be present. I am attaching a screenshot to illustrate my point.
  5. Hello! I've been migrating a Joomla site to PW. As I was at it, I could not help notice that the text of the articles I was importing into PW was messy. The site owner confessed that he simply pasted his text from MS Word into Joomla's editor, which resulted in very dirty HTML full of inline CSS and custom class names. So this got me thinking of tools I could use to clean this dirty HTML. After some search I stumbled across a handy PHP tool named htmLawed developed by Santosh Patnaik. What I liked about htmLawed was its flexibility in filtering and cleaning HTML. My
  6. Hi everybody! I am migrating a Joomla site and I am having troubles with Joomla's URLs. Joomla links look like this: www.example.com/index.php?option=com_content&view=article&id=80 I have set up my prependTemplateFile to detect GET variables that Joomla uses, and redirect to PW pages: // Example: index.php?option=com_content&view=article&id=80 if ($input->get('option') && $input->get('id')) { $j_article_id = $input->get->int('id'); $target = $pages->findOne("j_migration_id=$j_article_id"); // `j_migration_id` is the field where
  7. Hello Michael, In response to your earlier post: I've tried storing PageTable pages directly under the parent but it didn't work (for me, at least). However, the idea behind trying to use existing pages in a PageTable field escapes me. Why not use Page fields with PageListSelect+ instead? For instance, here is a screenshot of mock-up of a color chooser for a webshop item.
  8. Hi verdeandrea, and thanks for a chance to think it over. Why not have a template for Teachers where their names and emails would go, and another template with page fields which would display teachers' names and emails on your Course page? I did a mock-up quickie. If you are curious as to how it might look, I've attached a couple of screenshots.
  9. Excuse me for interrupting, but what PW version did you find this option for a PageTable field? I am using 2.5.3 and I see nothing like an "add an existing page" toggle for a PageTable field.
  10. Hi, Just my 5 cents. Give Closure Compiler Service a try. It is good at removing "dead" code, i.e. the functions of your libraries/frameworks that are not used in your JS code.
  11. Hello, You might want to look at HAProxy. Here's a nice article on using it. https://www.digitalocean.com/community/tutorials/how-to-use-haproxy-to-set-up-mysql-load-balancing--3 And this is an article on how to set up master-master Mysql replication. https://www.digitalocean.com/community/tutorials/how-to-set-up-mysql-master-master-replication
  12. Hello, PageTable is described as a leaner way to enter large amount of repeatable data into the admin backend, possibly with different sets of fields (think different templates). The main advantages compared to the Repeater are: 1. PageTable can save new pages where you tell it to. Repeaters are saved deep down the Admin pages and are given cryptic names. 2. One PageTable field can make use of several different templates. Repeaters play according to the "One repeater = one template" rule (roughly put). PageTable is a PageArray, so relevant methods are applicable. For example, here is
  13. Thanks, adrian, really appreciate your help. Yes, it started to work and I saw the 'custom' page action. The problem is, it now affects all instances of ProcessPageList, including /processwire/page/edit Thanks, though. I will see what I can do.
  14. Hello adrian, I am sorry to say but this code does not work on my environment. Here is what I have in my module: public function init () { parent::init(); wire()->addHookAfter("ProcessPageListRender::getPageActions", function($event) { // anonymous function $event->replace = true; $new_action = array ( 'cn' => 'custom', 'name' => 'Custom', 'url' => '/my/path' ); $event->return = $new_action; }); } public function ___execute
  15. Valery

    Fooled isit.pw

    Hey guys, Please, please read netcarver's warning before making changes to the 'admin' template settings. Changing access for non-logged in users from login prompt to http 404 may effectively block you from logging in! If you have locked yourself out (like I just did), do the following: - Log in to phpMyAdmin. - Find the 'pages' table, then Browse it and find the Id of the page named 'login'. Mine was 23 and I did not change the default settings. - Then go to the table 'templates', find the line with name=admin and edit it. Add , "redirectLogin":23 to the array (assuming that 23 is
×
×
  • Create New...