Jump to content

AnotherAndrew

Members
  • Posts

    168
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by AnotherAndrew

  1. Apeisa, All other pages are ok. This is the first PW site that I have done on any host. I migrated from localhost to the developing host a week ago. Everything was fine until I created two new text fields. They have unique names that should not interfere with PW. I do have a few custom modules installed, but they are not being used on the template page.
  2. Jasper, I tried that and it still doesn't work. I have two pages using the same template, whenever I edit anything, it throws a 404. I don't know what else to try!
  3. Yep, its odd. When the 404 shows, I am getting in the address bar foo.com/admin/page/edit/?id=1033#. Where the page I am editing is just foo.com/admin/page/edit/?id=1033
  4. Apesia, if I try editing another field, like the title field, and hit save, then again it throws me to a 404 page. Any ideas?
  5. Ryan, Thanks I did run a repair on the database and I even made a new database and that didn't work. It is strange because it is only specific to a certain template. What I did was create two new textarea fields, dropped in my code. Then in the editor, if I create a new line or change the styling, and then hit save, it goes to a 404 page. Perhaps I should delete the textarea field and create a new one? Or do you have any other thoughts?
  6. I just read that a shared SSL will often open a pop up window to warn users. So now I am thinking about using a standard SSL certificate. I don't think it is possible to use a shared certificate and maybe others would probably agree that from a user's standpoint, it is also a bad idea.
  7. I am developing (using MAMP) a new site that will have a dedicated IP. I want just one page to be using SSL. I have set up a template file for that one page. However, if I choose I SSL in the template page options, I can't view that page. How do I choose what the shared SSL server would be?
  8. Ryan, that's awesome and extremely useful. Thanks. Just an idea and I don't know how feasible it is, but wouldn't it make since to have repeating fields already built into the core processwire fields? For example, when adding a text field, image field, etc, a user would have an option for "make repeatable".
  9. Ok thanks. It now appears that I am not able to save any data in basic text fields. When I save a page, I get thrown to a 404 page. I can only make edits if I do it in the database. I'm not sure what is the problem.
  10. Oliver, I think I am having a similar problem. What version of mysql were you using? My host is using version 5.1, and I see the latest version is 5.6. Also, do you have a link to that bug report?
  11. Evanmcd, I love your site. Great typography, clean design, and easy to navigate. I'm curious as how you are incorporating the videos. What did you do? Do they have their own content fields? Are they mp4, flv, html5 complaint?
  12. Building off of this discussion, it would be extremely helpful if there was automatic backup of db files AND site template files, either via a module or built into processwire. Backups could be scheduled and work in the background. The wordpress plugin BackWPup is superb at this. A user can automatically backup to several different places: the current server, another server, dropbox, by email, amazon services, etc.
  13. I'm not sure if this has been discussed before...but it would be hot it a user had better control over managing files. For example, if a user wanted to update an image or document currently being used, then they could choose an update option, rather than re-uploading a file. In one of my current developing site, to change a document, a user must first delete the document / image, then upload a new one, and then relink to that document or image. It seems that if there was a file management module or if it was already built into processwire, then this would be much easier for the end user.
  14. Hey Ryan, I've got this working just almost like I want it to. But for some reason, I can't redirect my superuser to any page except for my "members" page. My code is below. Can you or anyone else lend some advice? Thanks in advance! <?php // $out is where we'll keep our output $out = ''; // $form is where we'll keep our custom login form $form = " <form action='./' method='post' id='login-form' target='_parent' > <p><label>Username <input id='input-name' class='text-input required default' type='text' name='user' title='Login name'/></label></p> <p><label>Password <input id='input-password' class='text-input required default' type='password' name='pass' title='Password'/></label></p> <p><input type='submit' name='submit_login' value='Login' id='submit' /></p> </form>"; if($user->isLoggedin()) { // user is already logged in if($input->get->logout) { // page was accessed with ?logout=1 GET variable, so log them out $session->logout(); $session->redirect('./'); } else { // tell them they are logged in and how to logout $out = "<div class='logout-error'><p class='logged-in-out'>{$user->name}, you are already logged in. Do you want to <a href='../../?logout=1' class='logged-in-out' target='_parent'>logout?</a></p></div>"; } } else if($input->post->user && $input->post->pass) { // user submitted the login form if($session->login($input->post->user, $input->post->pass)) { // login success if($user->isSuperuser()) { $session->redirect('../../'); } else { $session->redirect('/members/'); } $out = "<form id='success' action='$url' target='_parent' method='get'>" . "<input type='hidden' name='login' value='1' />" . "</form>" . "<script>$(document).ready(function() { $('#success').submit(); }); </script>"; // submit the form } else { // the login failed $out = "<p class='error'>Login failed. Try again.</p>"; $out .= $form; } } else { // user arrived at login page for first time $out = $form; } echo $out;
  15. Where is this "main.php" file that you are talking about? Do you mean any template file in a site?
  16. Have you tried using the html source button in the tinymce editor? If not, then that would be the easiest way.
  17. Ryan, I tried following your example here, but the form is not being displayed. Is there an else statement missing from the example you posted above? Actually, I figured it out!!
  18. Ryan and et al, Just wanted to say a big thanks to Ryan and the community for creating AND sharing a stunning and user friendly CMS for us php newbies! I am loving the way this CMS has developed and the ease it is to build and maintain a site. Please keep up the good work. And if there is anything that I can do to promote your work, please let me know!
  19. What do you mean by "use markdown or textile codes in the description"? Is that similar to using a <b> tag?
  20. After doing some digging, I see that this post has what I am looking for. I hope it helps someone else in the future. Basically, extending the image field module is what I needed to do it. And Ryan provided an excellent module to do this. Thanks Ryan!! http://processwire.com/talk/index.php/topic,466.0.html
  21. Is there not a way for a user to style the image description field in the admin? I want a user to be able to add bold and italics to the image description field.
  22. Ryan, thanks for the idea. The error works correctly in the modal box but the modal box does not close if the login is correct. If the login is correct, the modal box stays open and does not redirect to the appropriate page. Do you have any other suggestions? Based on your comments above, this is my code: <?php // $out is where we'll keep our output $out = ''; // $form is where we'll keep our custom login form $form = " <form action='./' method='post' id='login-form' > <p><label>Username <input id='input-name' class='text-input required default' type='text' name='user' title='Login name'/></label></p> <p><label>Password <input id='input-password' class='text-input required default' type='password' name='pass' title='Password'/></label></p> <p><input type='submit' name='submit_login' value='Login' id='submit' /></p> </form>"; if($user->isLoggedin()) { // user is already logged in if($input->get->logout) { // page was accessed with ?logout=1 GET variable, so log them out $session->logout(); $session->redirect('./'); } else { // tell them they are logged in and how to logout $out = "<p>You are logged in. <a href='./?logout=1'>Logout?</a></p>"; } } else if($input->post->user && $input->post->pass) { // user submitted the login form if($session->login($input->post->user, $input->post->pass)) { // login success if($user->isSuperuser()) { $url = './'; } else { $url = '/members/'; } $out = "<form id='success' action='$url' target='_parent' method='get'>" . "<input type='hidden' name='login' value='1' />" . "</form>" . "<script>$(document).ready(function() { $('#success').submit(); }); </script>"; // submit the form } else { // the login failed $out = "<p class='error'>Login failed. Try again.</p>"; $out .= $form; } } else { // user arrived at login page for first time $out = $form; } echo $out;
  23. I am using fancybox to load a custom login. And it works in the sense that if I call target='_parent' on the form action then the modal box closes and redirects to the member page. But what I want to happen, is if there is an error, then the error shows in the fancybox modal box. In order for the error to show I have to not specify a target in the form action. However, if login info is correct, then it redirects to the members page in the fancybox modal box. What I want is for the modal box to close and the user go to the page in the parent frame. Does anyone know how I can achieve this? This is how I am calling the login script: <div id="esns-login-wrapper"> <p><a class="iframe" href="/login/">Login</a> / <a href='./?logout=1'>Logout</a></p> <?php if($input->get->logout == 1) { $session->logout(); $session->redirect("/"); // start them on a fresh page, or redirect to another }?> </div> This is what I am using for fancybox $('a.iframe').fancybox({ maxWidth : 350, maxHeight : 300, fitToView : false, width : '350', height : '300', autoSize : false, closeClick : false, openEffect : 'none', closeEffect : 'none', showCloseButton: false, 'type' : 'iframe', padding: 0, margin: 0, scrolling: 'no', showCloseButton: false }); And this is what I am using for my login script: <?php // $out is where we'll keep our output $out = ''; // $form is where we'll keep our custom login form $form = " <form action='./' method='post' id='login-form' > <p><label>Username <input id='input-name' class='text-input required default' type='text' name='user' title='Login name'/></label></p> <p><label>Password <input id='input-password' class='text-input required default' type='password' name='pass' title='Password'/></label></p> <p><input type='submit' name='submit_login' value='Login' id='submit'/></p> </form>"; if($user->isLoggedin()) { // user is already logged in if($input->get->logout) { // page was accessed with ?logout=1 GET variable, so log them out $session->logout(); $session->redirect('./'); } else { // tell them they are logged in and how to logout $out = "<p>You are logged in. <a href='./?logout=1'>Logout?</a></p>"; } } else if($input->post->user && $input->post->pass) { // user submitted the login form if($session->login($input->post->user, $input->post->pass)) { // based on user roles where to redirect them if($user->isSuperuser()) { $session->redirect('./'); } else { $session->redirect('/members/'); } } else { // the login failed $out = "<p class='error'>Login failed. Try again.</p>"; $out .= $form; } } else { // user arrived at login page for first time $out = $form; } echo $out;
×
×
  • Create New...