Jump to content

JeevanisM

Members
  • Posts

    223
  • Joined

  • Last visited

Posts posted by JeevanisM

  1. On 9/2/2015 at 2:34 AM, Craig A Rodway said:

    Hi Tony! Welcome to the forum :)

    I think one of the fundamental things to consider with projects like these, is to actually look and analyse the existing data - the structure, the format, the quality, and any relationships there may be. It's almost going through the normalisation process but perhaps not as strict.

    It would be a good idea to take every column in the existing database to decide how that will be represented in the ProcessWire site. Probably, some of these will be simple translations - Varchars will become Text fields, and Ints will still be Integer fields. But what will be more important is the data in these fields - does it vary with just about every single dam? Is it a value representing Yes/No? Are there only a few values for that column that all dams can potentially use? If so, do the values all use the same spelling of words, or are some mixed case or have weird formatting or spacing issues? When you have a set list of values to choose from, this is where you can decide how to store the data in ProcessWire - Page fields, PageTables, Options field, etc.

    If your source data quality is good, your job will be easier. If it's not, there will be some work involved in preparing it so that it is clean to work with.

    You may already have a good idea of how your data looks or is structured, but I usually like to do some form of planning on paper or using a spreadsheet to map out the source data to the ProcessWire templates and fields. Doing the important work now will save you hassle later on down the line and will really help you to make the search feature more functional.

    As an example:

    In ProcessWire, I imagine there would be a template created called 'dam'. You might add the following fields to this template (just for starters):

    • title
    • description
    • location (FieldtypeMapMarker)
    • height (integer/float)
    • length (integer/float)
    • capacity/volume (integer/float)
    • country (Page field/Options field?)
    • built (date)
    • opened (date)

    For each dam, a Page would exist somewhere in the page tree, using the 'dam' template.

    As you've already seen the Skyscraper profile, you can probably look at that for more ideas on how to structure things though :)

    thanks for the input

  2. On 2/22/2020 at 5:05 PM, dragan said:

    This is not a question about PHP, but a matter of your frontend.

    You should look into the Cache API, indexedDB and service workers. What you probably want, it to build a progressive web app.

    https://github.com/pazguille/offline-first

    https://ponyfoo.com/articles/backgroundsync

    https://www.twilio.com/blog/2017/02/send-messages-when-youre-back-online-with-service-workers-and-background-sync.html

    https://github.com/pulseshift/lunch-pwa

    https://github.hubspot.com/offline/docs/welcome/

    thanks for the references, I will check it out

    On 2/22/2020 at 5:41 PM, LostKobrakai said:

    Personally I‘d first look into using an existing solution for gathering the data (I‘ve had good experience with https://feed2go.com/de/) and just create a way to bring back data into existing systems later. Webapps have the problem that their storage while available at times is not ensured to stick around. If e.g. the device disk space runs low it might be cleared out. Also you‘re already in the realms of a fully client side app, so you could just embrace it.

    thanks for the response

  3. I read some articles about the Django/Python super-man abilities and I got excited. Then I tried to run a test project and realized that I cannot simply setup the server just  as LAMP does !
    This is real pain in the as$$ to setup a Django/python server, I guess PHP is more than enough for Web Apps.

  4. Hi All,

    I am seeing so many places and been told several times that Python is going to over take PHP. Is it true ? what you think about this most heated debatable subject ? Any one think switching from PHP to Python / Django is a better option for future ?

  5. Hello All,

    Recently, I got an inquiry for a new project. This is about taking survey of demography. A person will go to each house and get details from and enter in fields and click save. Just straight forward, but the catch is what if the person go to a house which is actually a bit rural where no internet coverage available. In this case, whatever data input via the forms, Is it possible to store in local storage / buffer storage and whenever internet is available, it can be stored to the actual database ?

    I know this is easy for Mobile Android App, that data can be stored in Local Mobile Storage device. But is the same feature available for PHP web app ? If the person uses a mobile and access the mobile view of the webapp and input all these information when no internet available, is it possible to keep it in buffer and save to database when internet is available ?

    Please let me know if is there any such workarounds or methods

     

    thanks

     

     

     

  6. Content Management with WordPress : A Case Study

     
    4-5 minutes

    We all agree that wordpress is the leading CMS in the arena, the most famous one. But how much it really helps the user to fulfill the purpose : ‘ Manage Contents ! ” .

    Well, Lets see, recently I had to create a website in WordPress, nothing fancy or custom requirements, but a simple school website. So there was a purchased theme I had to integrate with contents. All these sounded cool but once I started to do the actual work, I realized a few bits and odds about the WordPress which I will share with in this article.

    I am a developer with a basic sense of design layout. So I see the design first, then fill the content into the layout once its finished. So this content has to be free and separated from the design layout. A person who manages the content should not be worried about the design layout tags ( Row, column, padding, margin etc ), hence the content management system serves its purpose. But in this WordPress theme, everything is inside the design itself. I will show you an example.

    In modern WordPress Themes, they come with lots of plugins packed. One of the most important plugin is the Visual Composer which is a kind of cool plugin helps the user to drag and drop HTML elements ( like text block, image, wp components etc ). This looks good at first but once you finished, your home page, for example, the Page Editor will show you the source code like this below.

    [vc_row css=”.vc_custom_1461134371794{margin-bottom: 0px !important;}”][vc_column offset=”vc_hidden-xs”][stm_spacing lg_spacing=”112px” md_spacing=”112px” sm_spacing=”112px”][/vc_column][/vc_row][vc_row css=”.vc_custom_1461134371794{margin-bottom: 0px !important;}”][vc_column offset=”vc_hidden-sm vc_hidden-xs”][rev_slider_vc alias=”hero”][/vc_column][/vc_row]

    Those are the Short Codes generated by this Visual Composer. Now what if you want to edit / add content to the page, say in Home page ? well, you have this edit with Visual Composer feature which shows as below.

    visuacomposer.jpg?w=1024

    This is how to add some new content elements to a Page

    visuacomosoier2.png?w=1024

    Now you can see, if you want to edit or add content, then you will need to do it with lots of options, which requires a little more technical knowledge than a normal Content Manager. For a Web Developer as I am, this seems ok, but what if this is for a Normal User ? For example, this school website, there will be a teacher or a school staff is going to manage the contents. Now, they have to learn the WordPress way of managing contents including Row, Padding, animation, margins etc etc.

    Look above, we have a plethora of components to be added to a Page / Post as in content, which is good for a Developer/Technical person. This reduces works in code level editing but this is an overkill for the purpose of Content Management System.

    The idea of separate the content from design is the backbone of a content management system ( CMS)

    But now the content is actually very much strangled inside the design. The Normal User cannot manage the content any more, so the requirement is now doubled.

    One can argue that, even in WordPress we can do the old fashioned way to separate content and design. But the complicated structure of WordPress is not at all user friendly for Rapid Dev in that manner. WordPress’s basic structure is built on Posts > Categories | Blog way. Now a Page in WordPress is either a single post content or compilation of various posts, which means, to manage the content in a single page, the user has to edit various posts. Now this issue is overridden by this Visual Composer thing, but the Content is strangled in Design. In addition to these the user who actually manage the content should be aware of all the design elements and its repercussions. One of the advantage of using WordPress is that You Have A Plugin for Every Requirement. But these plugins are third party, may not get updated as with the WordPress versions, which arises another extra responsibility for the content manager, again requires some technical skill.

    Considering all these, I prefer and suggest another Content Management System known as ProcessWire to my clients. PW is well designed in a way that to serve the purpose of Separate the Content from Design.

  7. On 11/20/2019 at 5:08 PM, rick said:

    Many ISPs throttle email delivery. I've had emails take up to a day to be delivered. There isn't anything you can do about their setup. This could be your email system or your client's email system or both causing the problem. You could possibly eliminate your provider by using a reputable provider, such as gmail, mailgun, etc. to send emails. You will still be at the mercy of the client provider though.

     

    you are right. I just fixed it with a dirty work around ?

  8. On 11/11/2019 at 9:40 PM, BitPoet said:

    Did you adapt the SMTP settings in php.ini? It might be configured to use sendmail by default.

    I am not sure about the php.ini settings in my shared hosting.

     

    One more query, can I just disable this verification link sending to registrant email feature ? can I just proceed and complete the registration with out that step ?

  9. On 11/18/2019 at 7:04 PM, Zeka said:

    @JeevanisM I don't think that your issue is relative to module. 

    You can try to use https://processwire.com/blog/posts/introducing-tracy-debugger/#mail-interceptor-panel to see how fast PW sends mail. 

    Can you please explain, how Login/Register send email ? Is it using the SMTP of admin email ? I have gmail for the admin email, so is there settings for permission in google to use the SMTP ?

  10. Hello,


    first of all, thank you for this great module. I would like to mention one issue I met when I used this module in my new project. I have a registration page link for users in my website, and when apply for registration, it will redirect to the page where the user has to put the activation / verification link which is sent to the registered email.

    Now the problem is, the time delay to get this link in email. It took almost 20 minutes to reach this link in the registration email. I checked with both yahoomail and gmail. I guess, in a business point of view, customers wont wait for that long time.

    So is there any way to speed up this email time delay ? any configuration settings ?


    thank you

  11. 16 hours ago, rick said:

    What does tracy debugger show:

    
    $u = wire('users')->get("name=saarun");
    d($u);
    d($u->Phone); // dump content of your fields

    When you view the user while in admin, what does that page look like? By that I mean you should see all the fields for the user template and the field's current values. If the field (for example, Phone) is empty, then there is an issue with saving the data to the page. Most likely the data is not the correct format.

    Do the logs display any information?

    Hello @rick

     

    thank you for replying me. I will explain step by step what I have done and what is my requirement.

    1. I have a user registration form built on Login/Register module in which I need to save the user telephone along with username/password. As a default, login/Register module only have email, password fields in the registration form. so I need a phone number field there too.

    2. so I searched and found there is a module called Phone Field type, I installed and created a new field using that type. I dont need any fancy feature, just need 10 digits without any country code or extensions

    3. then I added this new field to the user template, then I opened the Login/Register module configuration and added those this phone field

    4. I saved everything, and I went to registration form, in which I can see the new phone field entering form

    5. I registered, with email, pass and phone number

    6. But when I tried to output the phone number its empty, so I went to the users page in admin section and check if the number is saved. But its not saved.

    7. so I tried to save it from the admin/access/users page, and then I checked it via outputing, now its working. So the field is not getting saved from the registration step.
    8. so I thought this must be some conflict with login/register module and the phone field type module.

    9. so I created a new standard Integer field, and labelled it for phone

    10. I added this new field to user template > then login/user field to the registration page

    11. Before I register from frontend, I tried to save the phone number from the admin/access page but I got an SQL error

    Error saving field "userphone" - SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'data' at row 1 +1

    Now I am clueless, what to next ?

    How do I create a standard integer phone number field ? or why  the Login/Register module is not taking the phone type

  12. Awesome plugin... Just a small doubt. For a user who login / register using the GMAIL account, can we ( the developer ) extract this user email address, which is the gmail address this particular person used to login ? IF yes, how  ?

     

    thank you

  13. On 11/7/2019 at 2:12 PM, BitPoet said:

    If you plan to go live with validation email enabled anyway, it would also make sense to use a dummy SMTP server like FakeSMTP. That way, no mail is actually sent out but you have an instant preview, can save all mails to files, view those in your mail application and test the validation links inside.

    FakeSMTP is not catching my localhost SMTP messages. I tried port 25 and 2525

  14. Hello,

    I have created a standard field type as userphone , then I added this field to the User template. I created a phone field type using Phone Field module. I added this field to the User template also.

    image.thumb.png.f40f3d23d3f8849fdf15e13a06ef63b6.png

    Now I used the below to create a test user

     $u = new User();
    $u->of(false);
    $u->name = "saarun";
    $u->email = "saarunthomas@example.com";
    $u->pass = "123456";
    $u->Phone = 9446196667;
    $u->userphone = 9446196667;
    $u->headline = "hello there";
    $u->paid=1;
    $u->addRole("registered");
    $u->save();
    $u->of(true);

    and I tried to out put as below

         $item = $users->get("saarun");
    echo $item->email;
    echo $item->Phone;
    echo $item->paid;
    echo $item->headline;
    echo $item->userphone;

    and I got the output a below.  Neither the userphone value nor the Phone value are output ... what am I doing here wrong  ? pls help

    and I want to use this field in the Login/Register module. I want know whether this field support in the Login/Register registration form ??

    image.png.eee59c5c952dd521d71cb1dd8d23cd22.png

  15. Hello,

    I have created a standard field type as userphone , then I added this field to the User template. I created a phone field type using Phone Field module. I added this field to the User template also.

    image.thumb.png.f40f3d23d3f8849fdf15e13a06ef63b6.png

    Now I used the below to create a test user

     $u = new User();
    $u->of(false);
    $u->name = "saarun";
    $u->email = "saarunthomas@example.com";
    $u->pass = "123456";
    $u->Phone = 9446196667;
    $u->userphone = 9446196667;
    $u->headline = "hello there";
    $u->paid=1;
    $u->addRole("registered");
    $u->save();
    $u->of(true);

    and I tried to out put as below

         $item = $users->get("saarun");
    echo $item->email;
    echo $item->Phone;
    echo $item->paid;
    echo $item->headline;
    echo $item->userphone;

    and I got the output a below.  Neither the userphone value nor the Phone value are output ... what am I doing here wrong  ? pls help

     

    image.png.eee59c5c952dd521d71cb1dd8d23cd22.png

  16. Hello,

    I have created a standard field type as userphone , then I added this field to the User template. I created a phone field type using Phone Field module. I added this field to the User template also.

    image.thumb.png.f40f3d23d3f8849fdf15e13a06ef63b6.png

    Now I used the below to create a test user

     $u = new User();
    $u->of(false);
    $u->name = "saarun";
    $u->email = "saarunthomas@example.com";
    $u->pass = "123456";
    $u->Phone = 9446196667;
    $u->userphone = 9446196667;
    $u->headline = "hello there";
    $u->paid=1;
    $u->addRole("registered");
    $u->save();
    $u->of(true);

    and I tried to out put as below

         $item = $users->get("saarun");
    echo $item->email;
    echo $item->Phone;
    echo $item->paid;
    echo $item->headline;
    echo $item->userphone;

    and I got the output a below.  Neither the userphone value nor the Phone value are output ... what am I doing here wrong  ? pls help

     

    image.png.eee59c5c952dd521d71cb1dd8d23cd22.png

  17. Hello,

    I have created a standard field type as userphone , then I added this field to the User template. I created a phone field type using Phone Field module. I added this field to the User template also.

    image.thumb.png.f40f3d23d3f8849fdf15e13a06ef63b6.png

    Now I used the below to create a test user

     $u = new User();
    $u->of(false);
    $u->name = "saarun";
    $u->email = "saarunthomas@example.com";
    $u->pass = "123456";
    $u->Phone = 9446196667;
    $u->userphone = 9446196667;
    $u->headline = "hello there";
    $u->paid=1;
    $u->addRole("registered");
    $u->save();
    $u->of(true);

    and I tried to out put as below

         $item = $users->get("saarun");
    echo $item->email;
    echo $item->Phone;
    echo $item->paid;
    echo $item->headline;
    echo $item->userphone;

    and I got the output a below.  Neither the userphone value nor the Phone value are output ... what am I doing here wrong  ? pls help

     

    image.png.eee59c5c952dd521d71cb1dd8d23cd22.png

  18. Hello,

    I have created a standard field type as userphone , then I added this field to the User template. I created a phone field type using Phone Field module. I added this field to the User template also.

    image.thumb.png.f40f3d23d3f8849fdf15e13a06ef63b6.png

    Now I used the below to create a test user

     $u = new User();
    $u->of(false);
    $u->name = "saarun";
    $u->email = "saarunthomas@example.com";
    $u->pass = "123456";
    $u->Phone = 9446196667;
    $u->userphone = 9446196667;
    $u->headline = "hello there";
    $u->paid=1;
    $u->addRole("registered");
    $u->save();
    $u->of(true);

    and I tried to out put as below

         $item = $users->get("saarun");
    echo $item->email;
    echo $item->Phone;
    echo $item->paid;
    echo $item->headline;
    echo $item->userphone;

    and I got the output a below.  Neither the userphone value nor the Phone value are output ... what am I doing here wrong  ? pls help

     

    image.png.eee59c5c952dd521d71cb1dd8d23cd22.png

  19. 9 minutes ago, elabx said:

    In what context are you trying to output it? Do you mean in a tempalte,  after "first login"? Could I see some code?

     

    Basically, how can I store / save a phone number from the registration form ? Login/Register module supports only email and password fields for default. But I read some tutorials and tried this adding custom field to User template. But I am not able to output it

×
×
  • Create New...