Jump to content

vxda

Members
  • Posts

    169
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by vxda

  1. How exacly selector_field works ? i made template called list in it there is a field (checkbox) called dont_show if this checkbox is checked i dont want to show children of this template. how can i do this ? Ty
  2. Thank you guys for your time, its finaly working.
  3. Ty for reply Adrian still not working ;/ thing is i made some pages one of is asd@asd.pl and when i run this : $email_exists = $pages->find('asd@asd.pl'); if(count($email_exists) > 0){ echo 'error'; } i get error : Fatal error: Exception: Unknown Selector operator: '' -- was your selector value properly escaped? (in D:\xampp\htdocs\projects\midven\wire\core\Selectors.php line 165) #0 D:\xampp\htdocs\projects\midven\wire\core\Selectors.php(190): Selectors->create('asd', '', '@asd.pl') #1 D:\xampp\htdocs\projects\midven\wire\core\Selectors.php(63): Selectors->extractString('asd@asd.pl') #2 D:\xampp\htdocs\projects\midven\wire\core\Pages.php(143): Selectors->__construct('asd@asd.pl') #3 [internal function]: Pages->___find('asd@asd.pl') #4 D:\xampp\htdocs\projects\midven\wire\core\Wire.php(271): call_user_func_array(Array, Array) #5 D:\xampp\htdocs\projects\midven\wire\core\Wire.php(229): Wire->runHooks('find', Array) #6 D:\xampp\htdocs\projects\midven\site\templates\global\newsletter.html(46): Wire->__call('find', Array) #7 D:\xampp\htdocs\projects\midven\site\templates\global\newsletter.html(46): Pages->find('asd@asd.pl') #8 D:\xampp\htdocs\projects\midven\site\templates\home.php(8): include('D:\xampp\htdocs...') #9 D:\xampp\htdocs\p in D:\xampp\htdocs\projects\midven\index.php on line 214
  4. Hi guys, here is my code, im creating pages via form, but i want to show message when user allready submited his email. how can i achive this ? $out = ''; $form = $modules->get("InputfieldForm"); $form->action = "./"; $form->method = "post"; $form->attr("id+name",'subscribe-form'); $field = $modules->get("InputfieldEmail"); $field->label = "E-Mail"; $field->attr('id+name','email'); $field->required = 1; $form->append($field); // append the field $submit = $modules->get("InputfieldSubmit"); $submit->attr("value","Subscribe"); $submit->attr("id+name","submit"); $form->append($submit); if($input->post->submit) { $form->processInput($input->post); $email = $form->get("email"); if($email && (strpos($email->value,'@hotmail') !== FALSE)){ $email->error("Sorry we don't accept hotmail addresses for now."); } if($form->getErrors()) { $out .= $form->render(); }else{ $p = new Page(); // create new page object $p->template = 'newsletter'; // set template $p->parent = wire('pages')->get('/newsletter/'); // set the parent $p->name = $form->get("email")->value; // give it a name used in the url for the page $p->title = $form->get("email")->value; // set page title (not neccessary but recommended)\ $pageName = $p->name; $name = $pageName; $p->save(); $out .= "<p>You submission was completed! Thanks for your time."; } } else { // render out form without processing $out .= $form->render(); } echo $out; ?>
  5. Hi i would like to share with you guys, a website i made thx to Processwire. Im super happy with processwire and this community. Ty for help everyone. here is the site: chemik-police.com
  6. Hi, i would like to create register / login form on my page for users to register. So if they are registered and logged in they could have an access to quiz form's on the page. Is there any module that could help me with this ? ty.
  7. how about implementing this to ckeditor looks exacly of what we need. http://cksource.com/ckfinder ok its not free ;/
  8. Im wroking localy now and i cant get it right, i will try again after moving it to destination server.
  9. Hi, can i exclude showing children for parent with id="x" ? ? ( hide children for parent->id('1022')) i got my menu and in it is News page i dont want to show children on hover. Ty.
  10. Module just wont work. I type in the url and choose url to from pages select click save no errors comming up. but when i click on my menu item with this url redirect wont happend.
  11. Hi i need to sort pages for upcomming games. so i have this code <?php $Match = $pages->find('parent=1022, sort=date'); $tab = ""; $button = ""; $i = 0; foreach ($Match as $match ) { $date = date("d F", $match->getUnformatted("date")); $time = date("h:i", $match->getUnformatted("date")); $count = count($match); $selectVal = ''; if ($match->transmition == '1') $selectVal = 'tak'; else $selectVal = 'nie'; if ($i == 0) { $button .= "<a class='active {$i}' href='#tab_{$match->id}'>Następny mecz</a>"; $tab .= "<div id='tab_{$match->id}' class='tab active'>"; }else{ $button .= "<a class='{$i}' href='#tab_{$match->id}'>Poprzedni mecz</a>"; $tab .= "<div id='tab_{$match->id}' class='tab'>"; } if ($match->logo1) $logo1 = $match->logo1->size(77,77)->url; else $logo1 =''; if ($match->logo2) $logo2 = $match->logo2->size(77,77)->url; else $logo2 =''; if($date && $time) $tab .= "<dl><dt>Kiedy?</dt><dd>{$date} {$time}</dd></dl>"; if($match->team_name2) $tab .= "<dl class='teamname'><dt>Z kim gramy?</dt><dd>{$match->team_name2}</dd></dl>"; if($match->text_input) $tab .= "<dl><dt>Gdzie?</dt><dd>{$match->text_input}</dd></dl>"; if($match->text_input2) $tab .= "<dl><dt>Jaki typ rozgrywki?</dt><dd>{$match->text_input2}</dd></dl>"; if($match->text_input3) $tab .= "<dl><dt>Jakie bilety?</dt><dd>{$match->text_input3}</dd></dl>"; if ($selectVal) $tab .= "<dl><dt>Czy będzie transmisja?</dt><dd>{$selectVal}</dd></dl>"; if ($logo1 && $logo2) { $tab .= "<div class='clear'></div>"; $tab .= "<div class='logos clearfix'>"; $tab .= "<div class='logo1'><img src='{$logo1}' alt='' /></div>"; $tab .= "<div class='vs'>VS</div><div class='logo2'><img src='{$logo2}' alt='' /></div>"; $tab .= "</div>"; } $tab .= "</div>"; $i++; if($i > 1) break; } ?> <section class="next-match"> <div class="container"> <div class="span4"> <div class="tabs clearfix"> <?php echo $button; ?> </div> <div class="tab-wrap"> <?php echo $tab; ?> </div> </div> </div> </section> now i need first $tab to be the closest next date from today's date, in the second $tab i need to display the last one played from today's date. The first one is working fine showing exacly what i need, just cant figure out how to dispaly the last one played. Any idea how can i achive this ? Regards Paweł
  12. @Wanze I went with $pagination .= $news->renderPager(); cause it does not matter what the class name is. Worst thing is that when u have pagination there is a problem with sort : sort=-date does not work i manage to display newes posts on my page but with a little trick. In admin pannel i changed sort options to date. and then in my template i used sort=-sort Tho i dunno if there is a bug in module or i have some error Cheers
  13. I changed it to 'currentItemClass' => "active", and still got no result, also classes for next and prev are not workin. it works with default classes withour array like this : $pagination .= $news->renderPager(); Also when i got pagination sort=-date does not seams to work ;/
  14. @ diogo Lets say i made the site for my client. My client is a company and in it there will be 5 people administrating the site. So after my job is finished my client have no access to thoes oryginal images, and non of thoes 5 admins can use same images on site (well meaby if they send it to eachother by email). Having all files in one module make things easier cause they are accessible for all users of the site. I would honestly donate some money for this to be developed. Cheers
  15. Wanze but can you do it from admin panel ? Its exacly what onjegolders says.
  16. lets say i have page gallery 1 and in it i have img1,img2,img3,img4. on my other page i want to use same some images, lets say img2 and img4 to do that i need to find the files on my disk instead of just picking them up from server where they already are uploaded. same goes with files, lets say i got 20 files i need on my website but on diffrent pages, now each time i need same file for a diffrent page i have to upload it again. Best way of saying what i mean is this plugin for EE: http://devot-ee.com/add-ons/assets
  17. DOH i have to stop working late. Ty Wanze i will try it later on when im back at home.
  18. I was thinking about field image cause in my case im using it for galleries and stuff. If im correct right now there are folders created for each page id, and i have same image multiple times uploaded on my server.
  19. Hi everyone, somehow current class wont work for me here is my code : <?php $news = $pages->find("parent=1009, limit=2"); $out =""; $options = array( 'upscaling' => false, 'cropping' => "0,0" ); foreach($news as $newsitem){ $newsimg = $newsitem->images->first; $out .= "<li><a href='{$newsitem->url}'><div>"; if ($newsimg) { $newsimg = $newsimg->size(313,177,$options)->url; $out .= "<img src='{$newsimg}' alt='' />"; }else{ $out .="<div class='noImg'></div>"; } $out .= "<div class='name'>{$newsitem->title}</div>"; $out .= "<div class='date'>".date("j.m.Y", $newsitem->created)."</div>"; $out .= "</div></a></li> "; } $pagination .="<nav class='pagination'>"; $pagination .= $news->renderPager(array( 'nextItemLabel' => "Next", 'previousItemLabel' => "Prev", 'currrentItemClass' => "active", 'listMarkup' => "<ul>{out}</ul>", 'itemMarkup' => "<li>{out}</li>", 'linkMarkup' => "<a href='{url}'>{out}</a>" )); $pagination .= "</nav>"; ?> <?php echo $pagination; ?> <ul class="news-list"> <?php echo $out; ?> <li class="fill"></li> <li class="fill"></li> </ul> every thing else works without problem. Any sugestions ?
×
×
  • Create New...