Jump to content


  • Posts

  • Joined

  • Last visited

Posts posted by lsag

  1. Hello. Could someone tell me what i have to put in this template file? is it like a normal processwire template?

    checking the default template, i see 


    shouldn't this get me the entire content of the <body> tag? instead i get, as the only content, the page's url.

    Thanks for the patience to this noob

  2. Hello.

    i'm trying to install this module, but i have an error: 

    Module is not installable because not all required dependencies are currently met.

    says it need the module "WirePDF". In the documentation, says: 


    This module is a wrapper around the mPDF library. It is used by the Pages2Pdf module to create and store the PDF files, but can also be used independently to create/store/download PDF files.

    how do i create this wrapping, and make the module work?


  3. In it's simplest form it could be something like this, where $page->page_password is a textfield you can set for every page that needs the login.

    if ($_POST['awesome_password'] != $page->page_password) {
    echo <<<EOT
        <form name='form' method='post' action='$page->url'>
        <input type='password' title='Enter your password' name='awesome_password' />
        <br />
        <input type='submit' name='Submit' value='Login' />
    } else {
    echo "<p>This is the protected page. Content goes here.</p>";

    i'm also looking for something like this: protecting a page just with a password. I dont need user + pasword.

    But how do logout of here?


  4. now we speak about this, if i need to repeat the field in the same page (sender_address and reciever_address), how do i change its name, so i can access it from the template? Maybe with a repeater, but i'll have to use the indexed array, right?

  5. Hello. 

    I'd like to clarify something that's in the back of my mind for a while. If i have 10 fields with the same parameters, except only the labels, for example scatered in different templates, i must have 10 different copies of those unique fields?

  6. im also implementing pages protected only by a a password. The code here works, but like this the password isn't using any encryption. I tried to define the field as a password, and like this make it encrypted. But i dont know how to compare with the user input

    i tried this, where password_salt is a password field for this page:

    // this works: i got the input from the form password field
    $pw2= $input->pass;
    echo "<br />bd: " . $pw2;
    // here i got the: Error: Exception: Method Password::match does not exist or is not callable in this context 
    $pw3= $page->password_salt->match($pw2);
    echo "<br />password_salt: " . $pw3;
  7. Hello. i have a very weird error in jQuery. this is the message in chrome's console:

    i can see jQuery is being loaded properly, because this works, showing the expected alert box. But what on earth are those files? And "ui-bg_glass" seems to be a jQueryUI file, which i'm not using! 

    <script type="text/javascript">

    and i'm not calling other jquery scripts. it happens with any version i try to run (one at a time, of course)

    calling 2.1.1 with the CDN

    <script src="//code.jquery.com/jquery-2.1.1.min.js"></script>

    calling 1.11.0 with the CDN

    <script src="//code.jquery.com/jquery-1.11.0.min.js"></script>

    calling 1.11.1 locally

    <script src="http://localhost/clientes/promundi/site/v4_pw/site/site/templates/promundi/js/jquery-1.11.1.min.js"></script>

    calling 2.1.1 locally

    <script src="http://localhost/clientes/promundi/site/v4_pw/site/site/templates/promundi/js/jquery-2.1.1.min.js"></script>

    I'm not sure if this is a processwire issue, but i don't know where else to look for

    any ideas?

  8. now i tried upoloading with ftp the raw files, without using zip files (i use 7zip, thought it was the safest...) and i detect the modules, but have to install all one at a time. i then try to reimport the data base with phpmyadmin, and verifyed the pages table is there, apparently with the same values. i still dont have the same pages that i created in localhost.

    tried also the processMigrator tool. i got the error: "Unable to install module 'LanguageSupport': SQLSTATE[23000]: Integrity constraint violation"

    as mentioned here: https://processwire.com/talk/topic/7207-can%C2%B4t-install-languagesupport/ i tried to uninstall and delete all language related features. but now instead of languages definitions, i have all sorts of pages:


    in contrast, in my local files, everything is clean:


  9. i had the same problem: after install, i have a message: 

    Fieldtype 'FieldtypeCropImage' does not exist
    Fieldtype 'FieldtypeMapMarker' does not exist
    1. i tried to export all the files to a .zip, upload, unzip.
    2. checked permissions for site/assets/cache (its empty), site/assets/files
    3. the file .htaccess is there, with the same content as in localhost
    4. the database access infois are exacty the same, including database name, user and password
    5. then exported / imported the batabase with phpmyadmin, with no errors
    but the files for the modules are there, in site/modules, just like in my localhost. they all have 0755 permissions. the subdirectories all have the same permissions, and the files 0644. in the backend i tried to detect the modules and install manually, but they cannot be found. Even getting the permissions to 777, they cannot be found
    i also tried a clean install of processwire, and it works. then exported the profile with profile exporter and the db with the "database backups" module. but i still cant detect the modules
    the error message continues, and the frontend gets me a 404 page. Also, i only have the default pages and templates, that came with the initial installation
    finally, i have:
    processwire 2.5
    the server:
    MySQL  5.6.21
    PHP Version 5.3.29
    mod_rewrite is probably running, because i can install a new processwire site
    locally, i use wampserver, installed in windows 7
    any hint, plz?
  10. Hello. following this thread, i'd like to create a laguage switcher, that instead of showing the language titles (that i can do already), to show the respective image flag. what i did so far:

    1. created in the languages page template, a flag image field
    2. in my template, iv' put this in the template
    $currentLanguage = $user -> language; // remember language
    foreach ($languages as $language) {
      echo "teste ". $language -> id . " ";
      $user -> language = $language;
      if ($language -> id == $currentLanguage -> id) {
        } else {
          if($language -> bandeira){
          $b =  "<img src'".$language -> id."' />";
          $b =  $language -> title;
      echo "<li><a href='" . $page -> url . "'>" . $b . "</a></li>";
    $user -> language = $currentLanguage; // restore language

    this gets me the name of the file for both languages, but how can i get the entire url, and then show the image?

    cheers to all of you

  11. i created a page with some of those global settings, such as: a collection of images for the banner's slideshow, the sit'e logo, its name, the footer, etc. and to make it more dynamic, i merge it with the title of the page, like so:

    in the beginning of the file, before any html:

    $pg_settings = $pages -> get('name=settings');

    on the title:

    <title><?=$pg_settings->title ." / ". $page -> title; ?></title>

    and (for completion) on the footer:

  12. Hello ppl

    I'm trying to create an image banner to show in all pages of the site, and for this i created a page to hold multiple images in a field (latter im gonna deal with animating them). The page is published, So this is the tree of values i got:


    i can address the page with

    $pg_settings = $pages->get('name=settings');

    it seem to be correct because print_r gets me a biiiig array if info

    now the problem is getting the array of images, with their respective url's. I tried:

    $pg_settings = $pages->get('name=settings');
    // echo "<br />pg_settings: " . print_r($pg_settings->get("banners_slideshow")); // seems ok...
    $imgs = $pg_settings->get("banners_slideshow");
    print_r($imgs[0]->get("url")); // i got nothing??

    In this page i also have a non repeatable image field for the logo, so i think i cant use the images array from that page. 

    the question remains: how do i address a field with multiples images, that is in another page?

    thanks for the patience!

  13. Hello

    Im doing a multilanguage site, in Portuguese and English. But both languages have the same url. for example:

    in the administration of content of any page, the url editing for the version of the page in each language, show the same prefix for all of them. I tries to create a new language, and also shows there, with the same prefix


    I do have this plugins installed and active: 

    1. ProcessWire multi-language support.
    2. Languages Support - Fields 1.0.0
    3. Languages Support - Page Names 0.0.9
    4. Languages Support - Tabs

    And the prefixes are correctly specified:


    I dont know how i messed this up, but i need to correct it. I cant see any option thi change the prefixes, but iI thought that maybe i deleted something in the admin template. So, i replaced all default files with the original from the distro, and this still happens. 

    im using ProcessWire 2.5, wampserver 2.5, in windows 7

    thanks for any tips. Stay safe  :P

  • Create New...