Jump to content

mr-fan

Members
  • Posts

    848
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by mr-fan

  1. I'm using the Sessions via SessionHandlerDB...so this could be the bottleneck after the complete systemchange. How can i uninstall this module via API without harming the system? regards mr-fan
  2. The PHP User and FTP User are the same and in the same group permissions 777 are tested - i can't login so i can't install anything so far...but thanks for helping.
  3. If i try to force login via API i get only: Unable to complete this request due to an error. if($_SERVER["REMOTE_ADDR"]=='xx.xx.xxx.xx'){ echo "TEST"; $config->debug = true; $config->protectCSRF = false; $config->sessionChallenge = false; $config->sessionFingerprint = false; $session->login('xxx', 'xxxx') //$user = $users('xxx'); //$session->forceLogin($user); //run only my ip }
  4. Now i have new news from my hoster that i have to clear here.... PHP is running on this server with the modern version of Fast CGI FPM https://php-fpm.org/ Are there any problems or special settings that i have to look for??? Webserver is running not as the same user as www/PHP User only PHP and FTP User is the same, could this be the problem??? My local copy all worked great...i was very satisfied with the hosting until now. So i really don't wanna move the whole thing....and i don't wanna grab in the core files, but as a short solution it would be great if i could shut down this forge testing complete? regards mr-fan
  5. No problem - i'm poking in the dark the whole time....so every new hint is helpful - mostly i overlook something
  6. There is nothing special on this point...like i wrote it was a complete system move to new servers. So i had to change the entries: $config->dbHost = '127.0.0.1'; //stays the same $config->dbName = 'xxxxx'; //new db name $config->dbUser = 'xxxxx'; //new db user $config->dbPass = 'xxxxx'; //new pw The old db and the old filesystem stays and is accessable via old logins. So i have only new logins to the "live" DB and the "live" filesystem that are pointed to the Domain in a new vHost environment...
  7. Bumb....while it is kind a strange...could this "forge" testing shut down complete...? It seems that the permission are all there, every other setting in $config don't change something... I'm a little bit helpless - will try to build a local copy of the installation at next...
  8. So the nice message showed up on one of my sites, too... - did all config stuff to false ->same result if CSRF is false no message just reloading the login screen, fingerprint and SessionChallenge no chance) - did all files to 777 for testing (i mean all files...) PW Version is 2.7.2 PHP Version 5.6.24 Every Domain runs in a vHost with own php.ini on this shared host - www and FTP user and group are the same.... Checked some PHP vars like max_input_vars and so on...but Frontend is running only login is failing. phpinfo() check only strange thing that i found is: _SERVER["HTTP_COOKIE"] wire_challenge=lko0BUK8O8Vy.WWIfl6cVJxxxxxxxxx; wire=92fc8adbfe8486f7dee4aabdf1477a7dxxxxxxxxe Tested from different browsers, inconito mode, different computers... The Big Change was a infrastructure change of my hoster to a complete new system. So i had have to adapt/change DB access in config.php und use a new ftp access to change PHP files but it should all switched properly - like i wrote the frontend is running well. Only main problem after the systemchange was a PHP warning on frontend if i put display errors on about set_time_limit This function was disabled in the new environment, but i think that this has no impact so far. Best regards and no glue where to search...;) mr-fan
  9. On some NGO sites, i've the same problem that there is no place for the big commercial ad solutions and they have all regional partners for ads and there members. I setup a simple pagetable template with needed fields for real image banner ads, to administrate these kind of things. I count views and clicks with plain simple PHP and the output is randomized....just some fields(date from until, internal description and so on), templates and some lines of code. Editors can easy change ads. If you are interested write me a PM. regards mr-fan
  10. I would have googled it...;) http://stackoverflow.com/questions/15628305/creating-a-table-of-contents-in-php http://www.10stripe.com/articles/automatically-generate-table-of-contents-php.php https://css-tricks.com/automatic-table-of-contents/ https://www.princexml.com/forum/topic/1200/generating-a-toc-with-php regards mr-fan
  11. ...for such things there is no need for a whole fieldtype since you can make it in plain PHP. Usecase that i have was to depublish entries after a fix timeperiod that a user could set to his entry (1 week, 3 weeks and so on) Just as an very simple example from a .php file for a cronjob: //get all items to check foreach ($items as $e) { /// FIRST STEP - send mail 1 week before the entry is being unpublished! //set the calculate_type to the e_delay option value from the entry option field... $calculate_type = $e->e_delay; //calculate the to add time to the timestamp switch ($calculate_type) { case '1': $time_add = ' +3 week'; break; case "2": $time_add = ' +7 week'; break; case '3': $time_add = ' +11 week'; break; default: $time_add = '1'; } //timestamp to check is the modified date + $time_add $check_time = strtotime($time_add, $e->modified); //check if the current timestamp is greater than the $check_time == 1 week before e_delay is reached! if ($check_time >= $curtime) { //do something } else { //do something else } } the time peroids that you need could be a simple option field or a pagefield or even an integer field. Best regards mr-fan
  12. mr-fan

    Hanna Code

    A other solution to Hannacode in this case yould be working with a Textformatter.... If you in concern of usability you could let your user just put in the mp3 file in CKEEditor and let the Textformatter search for it (href regex for *.mp3*) and replace it with the player. So zero worrying about include audio files. You could take a look at the Youtube Textformatter from Ryan: https://github.com/ryancramerdesign/TextformatterVideoEmbed/blob/master/TextformatterVideoEmbed.module ...just as an additional option. regards mr-fan
  13. Hi Pete,

    i hope you've had a good start in 2017?

    I've to ask you to review my profile for the dev map, please. I'm waiting for activating....i only took the time on xmas holidays to create my personal portfolio page www.martin-freudenreich.de for the PW dev map ;)

    Best regards Martin aka mr-fan

    1. Pete

      Pete

      I'll get this sorted now for you :)

  14. Just a question on the review of my profile....how long took this review....i was patient for some weeks now ? regards mr-fan
  15. I would go with Media Manager or with a combination of pages (own central pagetree for documents) and may i use http://modules.processwire.com/modules/fieldtype-runtime-markup/ to generate a upload button (or use ?modal or something else).... But Media Manager is definitly build for such approach. best regards mr-fan
  16. I've implemented such a system to some sites with a pagetables field and some template functions to show ads. I count only impressions and clicks with simple PHP while generating the ad block and i count the click when i redirect the url of the ad page to the url of the ad itself. Ads in this case are real images, no iframes, no external hosting....so i think not really a enemy of adblockers How many ads you wanna manage? regards mr-fan
  17. events fieldtype would be a good starting point... But you could also go on this simple with pages, a custom admin page and a frontendform -rootpage events/bookings --reservation1 (data from the vititor - or a usersystem conected with a pagefield + data of the reservation) --reservation2 ... a reservation is created with a simple frontendform with two datefields (from - to) and a maybe a check if a existing reservation is affected... build a simple admin page where all not approved reservations are listed and a hook on save to the visitors that are approved by the admin. So you only have to build the frontendreservationform and the backendpage for the admin to approve and with pages you are futureproof for more features. If you have predefiened timeslots you could calculate the dates in the frontend calendar that a visitor see, and validate them on submit. Or if you have a difficult set of events and dateranges i would get back to the events fieldtype for the administration side and let the admin setup every bookable event/time slot with this fieldtype (with the fork even reccuring events...) and the use this entries for generating the calendar where visitors choose from (even with a integer field added to the eventtabel you can set the maximum participants for every single event.... You see there are as always many ways to go to provide a simple admin interface for your customer and all freedom of the frontend for the visitors, too...;) regards mr-fan
  18. Because we are searching for a turbo boost...
  19. @jmartsch i've a own registerform created with FormHelper from @pwFoo but not depending on FrontendUser and i use this code for usernam = email //check for email duplication if (email_valid($email) == true) { //email exists $out .= message("email exists...","danger"); } elseif ($password == ''){ //no password is there $out .= message("no password...","danger"); } else { //email is valid create so we first create a new user $u = new User(); $u->of(false); $u->name = $sanitizer->fieldName($email); $u->email = $sanitizer->email($email); .....save other fields go on... you can use $sanatizer->fieldName in a hook on FrontendUser module, too i guess... regards mr-fan
  20. working on API forms this module comes very very handy...
  21. I've a function to clean out non URL conform chars.....since i had problems with the hashes in URL Segments this works for me: /* * create a valid url save one time token * */ function RandomToken($lenght = 32) { $p = new Password(); $h = $p->randomBase64String($lenght); $given = array("/", "."); $replace = array("_", "-"); $hash = str_replace($given, $replace, $h); return $hash; }
  22. THIS MODULE IS AWESOME! just to say it....
  23. For all Listing propose a deeper view on Lister Pro is the choice for such tasks. All Formsubmissions could saved as pages. So you have the data available with the API. Forms could created in very different ways, so the access of the forms depends of your site setup and the default accessmanagment of ProcessWire. regards mr-fan
×
×
  • Create New...