Jump to content

Search the Community

Showing results for tags 'path'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Categories

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 9 results

  1. Hi Guys, Right now, I am using parents as breadcrumbs but I have pages under a parent page just to keep things organized. The pages are called in other areas of the site. I am trying to create user path history breadcrumbs. Meaning: If the user clicked a link to the page, it will show the path he took. Has anyone done this? Would love to see who has before I dive in. Thanks.
  2. Hello, I discovered processwire a couple of days ago and I am very impressed so now I am integrating it with the Yii framework (once complete I'll post a tutorial with code), so far it is going well but I do seem to have a problem with setting a new path for a $page->template->filename. Setting $config->paths->templates in the PW config.php file works fine but I want to be able to set Yii-specific config variables after I have included the PW index.php. I assumed that by setting $wire->config->paths->templates that this would be reflected in $page->template->filename but that doesn't seem to be the case. Is this a bug or am I confused? Any advice greatly appreciated.
  3. Hi, i need some help with a login script that im trying to implement under PW. When im enter the protectedpage.php it goes to login.php and then i fill in username/password and press login it just refreshes the login.php again and the input fields are empty. It should go to protectedpage.php after that but its not working. I think that there is a path och paths in the script that its wrong. All files are in the root of the template folder and i have a database table that im trying to fetch. I have also added the pages as templates in admin. If you see anything wrong with this please help. /thanks protectedpage.php <?php session_start(); require_once('config.php'); //phpinfo(); if(isset($_SESSION['id'])){ ?> <!doctype html> <html lang="sv-se"> <head> </head> <body> Lorem ipsum sit dolor amet. </body> </html> <?php } else{ header( "Location:../protectedpage"); } ?> login.php <?php session_start(); require_once( 'config.php' ); if ( isset( $_SESSION[ 'id' ] ) ) { header( "Location:protectedpage.php" ); } else { ?> <!DOCTYPE html> <html> <head> <title>Logga in</title> <link rel="stylesheet" href="<?=$config->urls->templates;?>css/login.css"> <script type="text/javascript" src="<?=$config->urls->templates;?>js/login.js"></script> </head> <body style="background-color:#bdc3c7"> <div id="main-wrapper"> <center> <h2>Logga in</h2> </center> <form action="../login" method="post" onsubmit="return validate(this);"> <div class="inner_container"> <div class="formgroup"><label class="lable-side"><b>Epost</b></label> <input type="text" class="text-side" name="email" id="email" value="<?php if(isset($_POST['login'])) { echo $_POST['email']; } else{ } ?>" autofocus> </div> <div class="formgroup"><label class="lable-side"><b>Lösenord</b></label> <input type="password" id="password" class="text-side" name="password"> </div> <div class="btngrp"><button class="login_button" name="login" type="submit">Login</button> <button type="reset" class="reset_btn">Återställ</button> </div> <div class="register_div"><a href="../register" class="register_link"><span>Registrera ny användare</span></a> </div> </div> </form> <?php if ( isset( $_POST[ 'login' ] ) ) { $email = $_POST[ 'email' ]; $password = $_POST[ 'password' ]; $query = $con->prepare( "select * from users where email=?" ); $query->bind_param( 's', $email ); $query->execute(); $result = $query->get_result(); $row = $result->fetch_assoc(); $hash_pwd = $row[ 'password' ]; $hash = password_verify( $password, $hash_pwd ); if ( $hash == 0 ) { echo '<script type="text/javascript">alert("Invalid Credentials")</script>'; } else { $query = $con->prepare( "select * from users where email='$email' and password=? " ); $query->bind_param( 's', $hash_pwd ); $query->execute(); $query_run = $query->get_result(); //echo mysql_num_rows($query_run); if ( $query_run ) { if ( mysqli_num_rows( $query_run ) > 0 ) { $row = mysqli_fetch_array( $query_run, MYSQLI_ASSOC ); $_SESSION[ 'email' ] = $row[ 'email' ]; $_SESSION[ 'id' ] = $row[ 'id' ]; header( "Location:../protectedpage" ); } else { echo '<script type="text/javascript">alert("No such Email exists. Invalid Credentials")</script>'; } } else { echo '<script type="text/javascript">alert("Database Error")</script>'; } } } else {} ?> </div> </body> </html> <?php } ?> config.php <?php $con = mysqli_connect( "localhost", "root", "htf43434" )or die( 'Database connect ' . mysql_error() ); mysqli_select_db( $con, 'ksf' ); ?>
  4. Hi, still amazed by the possibilities of Inputfield Dependencies, but haven't quite figured out how to use it: There's pages in different paths: HomeNobel prizeLiterature2012Page 1 Page 2 ... Economics2012 2011Page 1 Page 2 ... Yeah, I know, this structure doesn't make much sense at first sight. But trust me, it's elaborated. ;-) Now I've used one single template for Page 1, Page 2, etc. and it needs to be all the same. Only the field "topic" is different: I need it to be shown for pages in /nobel-prize/literature/..., but hidden for all other pages (like the ones in /nobel-prize/economics/...). So I put path%='literature' as a "Show this field only if"-condition. Doesn't work. What did I misunderstand? Thanks a lot Sarah
  5. Hello, it's very hard for me to describe the actual problem so I've attached two screenshots that contain all the required information. Basicly I'm trying to manipulate the page title that is rendered to the select field options within the page lister when setting up a filter using a PageField. (It's tedious to select the page you really want on duplicate titles) I can't find any solution to this problem. It doesnt seem to be as simple as hooking onto a render or textformat method. (Many attempts, no success ...) Please, can anyone help me out on this one?
  6. Hello, I have a PHP script being called by AJAX request. At this moment everything work perfectly, but my script is in the root directory, bootstraping PW. request = $.post('/public_html/pw/contactus.php', serializedData); My question is, it is possible to put this PHP script in my templates directory and call it from there ? (if I hardcode the path I get a 403 HTTP error and doing that can cause problem between dev environment and production); How I should code my path in the Javascript code ?
  7. Hello everyone, in the first line I need to say, that I am NO developer or programmer. I am just a german language translator and interpreter who is seeking for help. The freelancer who created a website ( I have tried to change the code in this line: <a href="'.$page->siteurl.'">. I managed to get the link work but just for one language. If I changed the language version the link showed me always the same version. Can someone tell me if someone like me without any knowledge in this matter can handle it to get this thing done? fix a problem with 'SEO boxes' visible here http://berlineo.com/pl/oferta/tlumaczenia-pisemne/''>http://berlineo.com/pl/oferta/tlumaczenia-pisemne/'>http://berlineo.com/pl/oferta/tlumaczenia-pisemne/ at the bottom (looks like radio button); the code was copied from the home page, where these SEO buttons are OK; I need this section to be usable wherever I wish to paste it; Can sombody tell me the reason for this and help me fix it? Thank you in advance!
  8. My site has several pages that require access to one-off scripts the rest of the site doesn't use. To keep pages loading as fast as possible we don't load these scripts on every page. Instead, we typically include them on a per-page basis in an extra block loaded after the footer html. When I first started trying to port to PW I added textarea fields for "extra_head" and "extra_footer" into my primary template, and I hoped I could include these script loading directives in the "extra_footer" block and be off to the races. In fact, this would have worked beautifully if I had hard-coded paths for these scripts. There's the rub, however! I was trying to do things the PW way, so I used the php directives to get the path to my site's "templates" folder. When I output this "extra_footer" field in the page, the php doesn't get executed, so I never get the script path, and the whole thing fails. <script src="<?php echo $config->urls->templates?>static/js/jquery.isotope.js"></script> I don't know if I have output the field in my template the wrong way, so maybe there's some other php or api call that will cause it to actually interpret the code in this field during output? Here's what I have used: <?php echo $page->extra_footer; ?> I had this problem in other places, too. For example, during the port of the site we decided to start out with a "body" textarea that we bulk-dropped the html markup from the previous site into. This html had references to images and other static resources that we tried to access with the same type of php path reference as in the example above. Of course, none of it worked because that php code never gets executed. Is there a way to have the php in fields get executed during the page production? If not, is there some other reasonable way to get the path to site resources like scripts and general-purpose images (that wouldn't usually be included in a page's "images" field? Thanks, Rick
  9. I'm attempting to make a photoblog type of site and was wondering if there's a clean way to get the image directory path when using the $image->size method. The purpose of this is so the user can upload their large images, display as a thumbnail and click to view a medium version no taller than 800px within a modal. As you can see, I've had to hardcode the site/assets/files directory. Is there another method? (*the getThumb function refers to another installed module) foreach($page->images as $image) { echo '<a href="site/assets/files/'.$page->id.'/'.$image->size('','800').'"><img src="'.$image->getThumb('thumbnail').'" alt="'.$image->description.'"/>'; }
×
×
  • Create New...