Jump to content

Faisal

Members
  • Posts

    70
  • Joined

  • Last visited

1 Follower

About Faisal

  • Birthday 12/06/1975

Contact Methods

  • Website URL
    http://www.fh.sa

Profile Information

  • Gender
    Male

Recent Profile Visitors

3,547 profile views

Faisal's Achievements

Full Member

Full Member (4/6)

38

Reputation

1

Community Answers

  1. yes indeed! its just I did it earlier but forget to mention it
  2. Yes, sorry for my last test I upload 2 images (5KB and 719KB) only the 5KB is uploaded but a 719KB is not I have also try PW 3.x on the same server but it's the same issue. I uploaded the same image 719 KB to another PW 2.x/3.x on other servers and no problem szabesz I will send this formula to the website owner to send to server support to apply I will update this asap Thank you All
  3. Hi, I installed PW 2.8.62 On a cPanel / Safe mode ON / PHP 5.3.29 / MYSQL 5.5.57-cll I hade an error message regarding safe mode with the fix of adding a temp folder and config edit. (done) But most of the time images upload just stuck at 100% More info I think may be useful max_execution_time = 30 max_file_uploads = 20 memory_limit = 512 M post_max_size = 128 M From the search, I found that I need to edit post_max_size to be equal to memory_limit but I am not sure! Can you help me, please Thank you.
  4. Hi all, In a default multi language install when I add a TextLanguage or a TextareaLanguage fields and make it required, only default language will be required in the add page form which it is fine. But is there any way I can make some of the fields required for all languages in some templates?
  5. I think I need to have "Default language homepage URL is same as root URL?" set to "no" in /admin/module/edit?name=LanguageSupportPageNames so that home link go to domain.com/en insted of domain.com/ when looping home children in navbar etc... Now I am trying to find out how to make domain.com/ show splash page content rather than the default content in my _out.php Append template file $pageindexurl = $_SERVER[HTTP_HOST].$_SERVER[REQUEST_URI]; if ($pageindexurl == "/") { include_once("./_layoutspalsh.php"); // layout for splash page } else { include_once("./_layouthtml.php"); // default layout for home/lang* and all other pages } But domain.com is redirecting to domain.com/en before anything else
  6. Thank you @tpr I have the settings exactly as you said in the first place.
  7. Hi all, I have this website project with multi-language support: English is the default language and Arabic as a secondary language. The installed language modules are: (Languages Support, Languages Support - Fields, and Languages Support - Page Names) Homepage settings: page name: "en" for English and "ar" for Arabic. So the current links are: domain.com/en is redirecting to domain.com/ for English And domain/ar for Arabic But the project owner want's to do these changes: domain.com/ act as a splash page (have website logo and language select) only. domain.com/en the English version (and make the home link go to domain.com/en insted of domain.com/) when looping the nave tree for example: echo renderTopNav($homepage->children->prepend($homepage)); domain.com/ar the Arabic version I try to bypass the redirect but I failed to do anything about it. Any help or notes making this happen is highly appreciated, Thank you.
  8. You can also checkout the site-languages profile included with ProcessWire as a quick startup and example.
  9. Hi @Junaid Farooqui, and thank you @adrian. Till now there isn't an Arabic language pack for processwire. I have fully translate and helped translating some web applications in the past (private and public projects). sometime for apps that I didn't even like But why I didn't start making an Arabic language pack for processwire till now? (and I am in deep love with processwire) I am not going to say I didn't get the time to do it just yet or something like that, even it's true. It is because of Mr.Ryan, He made it so easy and simple to have a localize your admin area even if you don't have a language pack (this man is not just a normal programmer or developer) he is a magician I made a small website for someone don't understand English and he don't need/want full accesses to admin so I just install language module in the core and translate whatever he needed only and everybody is happy I have a plan to make an Arabic language pack but I can't tell any estimate time for it but that just me. However, if you need any help I will be happy to assist. And sorry for my bad English expression.
  10. Hi all, I make a website using PW for one of my friends/clients and I using the template file method by Ryan to make the XML sitemap. The website is multi-language (English is default) so when I give him the sitemap links for every language he ask me why is the http://www.domain.com/sitemap.xml have the same content as http://www.domain.com/en/sitemap.xml and ask me if it possible to use only one site map file that content/linked to all other sitemaps so I make some changes so that http://www.domain.com/sitemap.xml will output: <?xml version="1.0" encoding="UTF-8"?> <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <sitemap> <loc>http://www.domain.com/en/sitemap.xml</loc> </sitemap> <sitemap> <loc>http://www.domain.com/sublang/sitemap.xml</loc> </sitemap> </sitemapindex> So I change: echo renderSitemapXML(); In to: $mapindexurl = $_SERVER[HTTP_HOST].$_SERVER[REQUEST_URI]; if ($mapindexurl == $_SERVER[HTTP_HOST]."/sitemap.xml") { //echo renderSitemapindexXML(); I tried to move the code below to a function but the language loop did not output anything echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n" . '<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'; foreach($languages as $language) { if(!$page->viewable($language)) continue; // is page viewable in this language? $url = $page->localUrl($language); echo "\n<sitemap>" . "\n\t<loc>http://" . $_SERVER[HTTP_HOST]. $url . "</loc>" . "\n</sitemap>"; } echo "\n</sitemapindex>"; } else { echo renderSitemapXML(); } Its working fine and I hope this is useful to someone if the code is OK I also hope if someone can review it since I am not a code writer Thank you
  11. Oops! Thank you it is working now $content = "<h1>".$page->title."</h1>"; $content .= $page->body; if(count($page->files)) { $attachments = ""; foreach($page->files as $file) { $attachments .= "<a href='$file->url'>$file->name</a><br>"; } } else { $attachments .= "No Files!"; } $content .= $attachments;
  12. Hi I have pages with multi attachment I have field type file with the name files and the Formatted value is Automatic my template file code $content = "<h1>".$page->title."</h1>"; $content .= $page->body; if(count($page->files)) { foreach($page->files as $file) { $attachments = "<a href='$file->url'>$file->name</a><br>"; } } else { $attachments = "No Files!"; } $content .= $attachments; The problem is it only show one file even if there are more than one!
  13. OK it didn't work this way but I find this https://processwire.com/talk/topic/2089-create-simple-forms-using-api/ And https://processwire.com/talk/topic/4788-creating-pages-via-api-but-show-error-when-duplicate/ test and working great $out = ''; $form = $modules->get("InputfieldForm"); $form->action = "./"; $form->method = "post"; $form->attr("id+name",'family-form'); $field = $modules->get("InputfieldText"); $field->label = "Name 1"; $field->attr('id+name','family_firstname'); $field->required = 1; $form->append($field); // append the field $field = $modules->get("InputfieldText"); $field->label = "Name 2"; $field->attr('id+name','family_secondname'); $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); if($form->getErrors()) { $out .= $form->render(); }else{ $p = new Page(); $p->template = 'family-form'; $p->parent = wire('pages')->get('/family/'); $p->name = date('y-m-d-H-i-s-u'); $p->title = $form->get("family_firstname")->value." - ".$form->get("family_secondname")->value; $p->family_firstname = $form->get("family_firstname")->value; $p->family_secondname = $form->get("family_secondname")->value; $p->save(); $out .= "<p>You submission was completed! Thanks for your time."; } } else { // render out form without processing $out .= $form->render(); } echo $out; very beautiful
  14. Hi all Can I override some values in FormTemplateProcessor? This is one of my forms and it works fine. $form = $modules->get('FormTemplateProcessor'); $form->template = $templates->get('family-form'); // required $form->requiredFields = array( 'family_firstname', 'family_secondname', 'family_thirdname', 'family_familyname', 'family_email', 'family_city', 'family_job', 'family_mobile' ); // $form->email = 'your@email.com'; // optional, sends form as email $form->parent = $page; // optional, saves form as page echo echo $form->render(); // draw form or process submitted form when add new page: Can I use (family_firstname family_secondname family_thirdname family_familyname) in page title instead of date? Can I change the default success message? Can I change the Submit button value? for example "Add your info" Thanks
  15. Yes, it's not PW related issue. that's what was driving me crazy!!! and I knew that since day 1 of this problem. And I don't like just fixing the problem, I always like to know what and why cause this and that. By the way I didn't figure it out the solution my self. I google the Chrome error message and all I can find is: 1- This is an Apache related issue. 2- Some people say to install gdp for debug Apache and here is one of them http://sysadmin.carlusgg.com/?p=197 3- Some people say disable all PHP extensions, if the error is disappear, enable theme one by one until you find the one causing this. Since I have only have ioncube and zend only, I try my luck with ioncube and zend and it's worked for me so I post my experience with it here so it may be helpful to somebody else. Thank you all.
×
×
  • Create New...