Jump to content

vxda

Members
  • Posts

    169
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by vxda

  1. I want to store data on thoes pages. Yes i think thats what im looking for: Thanks i will read into that.
  2. Hi guys. Im planing to make couple of sites with simillar content and i wonder if it is possible to have one master site that will send articles with images to other sites i choose and then on thoes sites it will automaticly create page and fill all fields. MASTER SITE | ------------------------------------------------------------------------- | | | | OTHER SITE OTHER SITE 2 OTHER SITE 3 OTHER SITE 4 Anyone was doing something simillar? any ideas how this can be done? Thanks Paweł.
  3. Hi guys, im working on a new page and i noticed that Select Multiple Transfer Field. stopped working. im choosing selectMultiple* opption but there is no plugin showing up on the page. Anyone has same problem ? Ok its my bad, i forgot to do this : Modules menu and click the core InputfieldPage module to configure it (Modules > Core > Inputfields > Page). Select InputfieldSelectMultipleTransfer as an allowed Inputfield for Page selection, and save.
  4. Some update on the site. now there is also a shop with Polish payment system payU. Its based on apeisa shop module. http://chemik-police.com/sklep/ Also would like to add that the team, the site is for is now champion of Poland
  5. @diegonella Hi the solution is one post above yours : https://processwire.com/talk/topic/6619-login-user-without-his-pass/?p=64829 If u still have problems please give me some more details . cheers
  6. Im using susy, its awesome tool, specialy helpful when converting basic page to responsive. Before that i was using Foundation but custom build only grid. And when i want site to be super responsive i dont user breakpoints i just resize browser and add media queries where needed, then u can use gulp task to clear all media queries with this plugin: https://www.npmjs.org/package/gulp-combine-media-queries i build http://hate.it this way (without breakpoints).
  7. I found that downloading ckeditor and implementing it was way easyer, Download from here: http://ckeditor.com/download Include ckeditor.js on website along with jquery plugin. <?php echo '<script src="'.$config->urls->templates.'js/ckeditor/ckeditor.js"></script>'; echo '<script src="'.$config->urls->templates.'js/ckeditor/adapters/jquery.js"></script>'; ?> enable plugin for textarea with id selector in your js file function enableCkeditor() { $( 'textarea#editor1' ).ckeditor(); }; and woop it works http://hate.it/add-hate/ you need to be loged in to see form tho . Hope it helps someone
  8. Thanks for reply. lol i should fix that. , something with www.hate.it. site can be seen here : http://hate.it/ Thaks for link i will look it up.
  9. Hi right now on my website www.hate.it. When u want to add a hate (post) u can use basic textarea. I wonder is there a way to use some more advanced editor like for example this one we use on processwire forum. Anyone implemented something simillar ? Cheers. Paweł
  10. Yes, they all have same template, template="hejt".I will check if there is some pattern in this chaos when il get home. Another thing is that i have also a possibility of changing parent thru small module iwht lazyCron i made. Its simple: Choose date and parent on wich this page will me moved. When its moved by lazycron it all seam to work oO. Tho i will test it again to be sure.
  11. for a home page its a bit complicated, dunno if it tells you anything. Problem is not with home page but category pages wich have : $hejts = $page->children('template=hejt, sort=-sort, limit=25'); $allText = $pages->find("template=hejt, text_yes=1, sort=-created"); $text = ""; if ($page->id == 1) { $textModulo = 5; if ($pages->get(1)->nr_f) $textModulo = $pages->get(1)->nr_f; $hejts = $pages->find('has_parent=1020, template=hejt, sort=-modified, text_yes=0'); $count=1; $afterArr = new pageArray(); foreach ($hejts as $item) { if ($count % $textModulo == 0) { $afterArr->push($item); } $count++; } $i = 0; foreach ($allText as $textPage) { if ($i < count($afterArr)) { $hejts = $hejts->insertAfter($textPage, $afterArr[$i]); $i++; } } $limit = 25; $start = ($input->pageNum - 1) * $limit; $total = $hejts->count(); $topHejt = $pages->get(1)->page_f_2; if($topHejt->id != 1561) { $hejts->prepend($topHejt); $hejts->unique(); } $hejts = $hejts->find("start=$start, limit=$limit"); }else if($page->id == 1286) { $hejts = $page->children('template=hejt, sort=-created, limit=25'); // $pagerMarkup = $hejts->renderPager(); }else{ //THIS IS LIST THAT IS DISPLAYED IN WRONG ORDER $hejts = $page->children('template=hejt, sort=-sort, limit=25'); } if($page->id == 1562) { $hejts = $pages->find('has_parent=1020, template=hejt, sort=-created, text_yes=0, top_hejt=1'); }
  12. Yes this is the case. There is a bag of "send by users" pages, when article is good im moving it to designed destination ie,: Post is about sport so i move it to pages -> categories -> sport On homepage im displaying all new posts that have been moved from bag of "send by users" pages. example: http://hejtuje.com/hejty/technologie/ the post with facebook app on iphone, as u see in this list its like 3rd in a row here one homepage http://hejtuje.com/ is first ( dont count top hejt cause its allways first).
  13. Hi, on my website i have upcoming posts/pages added by users. When i choose to show it on homepage i change page parent to different one. When im doing it from the page level so : page_i_want_to_move -> edit -> settings -> Parent Page is changing parent but it never goes at the top of the site, but somewehere in the middle, mby couple positions form the top. Parent is set to manual drag-and-drop. I need to adjust the page in new parent by manual drag and dropping in the page tree. Any idea why this happends ? Thanks.
  14. Hi, some time ago i developed hejtuje.com, its default language is Polish, as i was building site i was adding translation for second language English. Now i choose not to use multisite module and i just copied website to new folder for hate.it. Its default language is still Polish with translation of english there. I would like to make english my default for this site. is it possible ? I tryed changing language for guest user but it didnt work. If its important i updated PW from 2.4 to 2.5. Any ideas how to change default to English ? Thanks.
  15. Hi guys, im thinking about purchasing ProCache module, but i dunno if it will be any good on my site http://hejtuje.com. Content on the site is added by users and its changing all the time. Would my site benefit from proCache or caching is just a bad idea for this type of site ? Please advice. Thanks!
  16. vxda

    Social Website.

    Hi sorry was busy. So the main idea is to give people the ability to say whats frustrating them, not only in the world but also localy. We have Categories like politics,sport etc. and town's (larger towns in Poland). User need to register to vote or to create new issue. On forum we can find some examples of user register forms. I used the one which creates user and page. This way i can easyly show users posts like this : http://hejtuje.com/members/vxda/ Also when user register there is confirmation email sent to user. If user will not confirm there is a lazycron module every couple of hours that deletes each user that didnt confirmed his email. There is also a way to register and login via facebook. For that i used apesia module : http://modules.processwire.com/modules/facebook-login/ . I changed it a bit so that when user registers with form, he can also login with facebook and it merges into one account. User can choose to stay lagged in, for that i used plugin made by craig-a-rodway http://modules.processwire.com/modules/login-persist/ User creates issue: basicly used guides from forum, its quite easy to allow members to create pages. I used adrian's module for grabbing thumbs from video's: http://modules.processwire.com/modules/process-get-video-thumbs/ For vote system i acculy asked my firend php programmer and he did that one for me. For comments we used disqus. Had some problems with SSO (single sign on) so here another friend helped me out. This way whenever user register/login it automaticly creates account on disqus and log user in (no need to register on site and disqus separately). To make it a bit more fiendly for user i also detect from which city user is visiting website, then im comparing result with cities i got on my website, if there is a match im showing the first issue from that city on home page. If not showing the first issue from capital. whats next ... humm there is quite alot of jquery and ajax. If u got any questions please ask il try to answer them best i can. Here are some topic's i made during development: https://processwire.com/talk/topic/6763-lazy-cron-problem/ https://processwire.com/talk/topic/6619-login-user-without-his-pass/ https://processwire.com/talk/topic/6562-sending-email-after-moving-page-from-one-parent-to-another/ Cheers
  17. Hi i got 2 products in my shop (im in developing stage) One product has price of 50.12, second 120 The one with price 120 will add to cart without a problem, the other one will not. Im working on ProcessWire 2.3.0.3. here is the error: Error: Exception: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '12, session_id = '47d81138ac1a7315664741263203c18aef6a7422' ON DUPLICATE KEY UPD' at line 1 (in C:\xampp\htdocs\projects\chemik\www\wire\core\Database.php line 118) #0 C:\xampp\htdocs\projects\chemik\www\site\modules\apeisa-Shop-for-ProcessWire-6a482d9\ShoppingCart.module(162): Database->query('INSERT INTO Sho...') #1 [internal function]: ShoppingCart->___addProductToCart(Object(Page), 1) #2 C:\xampp\htdocs\projects\chemik\www\wire\core\Wire.php(271): call_user_func_array(Array, Array) #3 C:\xampp\htdocs\projects\chemik\www\wire\core\Wire.php(229): Wire->runHooks('addProductToCar...', Array) #4 C:\xampp\htdocs\projects\chemik\www\site\modules\apeisa-Shop-for-ProcessWire-6a482d9\ShoppingCart.module(42): Wire->__call('addProductToCar...', Array) #5 C:\xampp\htdocs\projects\chemik\www\site\modules\apeisa-Shop-for-ProcessWire-6a482d9\ShoppingCart.module(42): ShoppingCa Cheers
  18. vxda

    Social Website.

    Hi i just finished website that i build on processwire. Im a frontend developer and noob with php. But with processwire i managed to build this site, so i want to thank you for giving us such a great tool for building websites. Here is website in Polish, and in a month or so i will release english version of the site. http://hejtuje.com english version will be avaible in here : http://hate.it Some feedback would be nice . Thanks PW!.
  19. Thanks Craig and Mad, i will check your advices out. im using Polish provider - home.pl, and yes i think its cloud.
  20. Hi, for some reason module create empty files. Anyone else got same problem ?
  21. That did the job ty. Here is my code: <?php class removeInactiveUsers extends WireData implements Module { public static function getModuleInfo() { return array( 'title' => 'Remove inactive users', 'version' => 101, 'summary' => 'Every X minutes removes inactive accounts', 'singular' => true, 'autoload' => true ); } public function init() { $this->addHook('LazyCron::everyMinute', $this, 'removeInactiveUsersFn'); } public function removeInactiveUsersFn(HookEvent $e) { $inactiveUsers = $this->users->find("!user_activation$=0"); if(count($inactiveUsers)){ foreach ($inactiveUsers as $u) { $this->users->delete($u); } } } } Ty for help guys
  22. Ty guys fixed that double $, but still no good ;/
  23. Hi i made a module for deleteing users that didnt confirmed their accounts so im using Lazy Cron for doing it. but its not dooing anything. I made module file : removeInactiveUsers.module in it i have this : <?php class removeInactiveUsers extends WireData implements Module { public static function getModuleInfo() { return array( 'title' => 'Remove inactive users', 'version' => 101, 'summary' => 'Every X minutes removes inactive accounts', 'singular' => true, 'autoload' => true ); } public function init() { $this->addHook('LazyCron::everyMinute', $this, 'removeInactiveUsers'); } public function removeInactiveUsers(HookEvent $e) { //If field "user_activation" is not 0. (zero); $inactiveUsers = $this->$users->find("!user_activation$=0"); if(count($inactiveUsers)){ foreach ($inactiveUsers as $u) { $users->delete($u); } } } } so i installed module and nothing happends. Any tips of what im doing wrong ? Ps. i have Lazy Cron module installed
  24. Ty Craig, your code saved my life here what i did was ... i added your function to FacebookLogin.module public function authenticate($event) { if ($event->return) return; // already authenticated $sess_name = $this->wire('session')->get('tmp_name'); $sess_pass = $this->wire('session')->get('tmp_pass'); $user = $event->arguments('user'); $pass = $event->arguments('pass'); if ($sess_name == $user->name && $sess_pass == $pass) { $this->wire('session')->remove('sess_name'); $this->wire('session')->remove('sess_pass'); $event->return = true; } else { $event->return = false; } } and at the bottom i replaced $session->login($u->name, $u->pass); with: $name = $u->name; $this->wire('session')->set('tmp_pass', $pass); $this->wire('session')->set('tmp_name', $name); $this->wire('session')->addHookAfter('authenticate', $this, 'authenticate'); $this->wire('session')->login($name, $pass); if i find user on my site i also removed all instances of. $u->pass = $pass; $u->save(); and its working ty again
×
×
  • Create New...