Jump to content

Search the Community

Showing results for tags 'page creation'.

  • 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
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

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 4 results

  1. I love nice urls - but I also recognize that they are not always needed nor desired due to the additional steps in page creation. Suggested solution: Page ID Page ID is a per-template auto-incrementing number. No. series might be added on a per-template basis (to be configured by webmaster). Page url Replace the full page url with an ID (as an optional configuration). Page url might then change to something like: www.example.com/page/1234 Editing (Page Tree is much less important in this scenario.) Like Drupal's Node IDs (nid). Why this change? Name may reveal confidential info. Name may not matter on certain templates. Page creation is no longer a two-step process; much like adding a row in MySQL. Benefit: This change will make it easier to use ProcessWire for other purposes than websites ("Oh - so ProcessWire is also a finance system!").
  2. Reference: PW 3.0.111 and uikit3 based site using the Regular-Master profile. I am trying to create a process whereby when a user logs in to their profile page (the user is automatically redirected to their profile page on login) and they then go to their 'members' page and creates a child page ('club-member'), the data stored in the user template ($user->usercode) is automatically added to the equivalent field on the club-member page. This will be applicable only to the template used for the 'club-member' pages. Once the new page has been created the equivalent 'usercode' field on the 'club-member' page should not be subsequently editable. Below is the page hierarchy for visual reference: Login (home) |__ profile |__ members |__ club-members It seems like an AddHookBefore might be the solution here such as: wire()->addHookBefore("Pages::saveReady", function($event) { $page = $event->arguments(0); if($page->template == 'club-member') { $clubcode = $user->club_code; $field = $page->club_code; $field->set('value', $clubcode); } }); I am I on the right track or is there a better way to achieve this? Any thoughts appreciated.
  3. Hello, This is not directly about language module but I think I can get information from you. Can I add a vendor module to have all languages written automatically into name? I used this vendor module which is good with any language (hebrew, arabic...). How could I add it, so admin interface can use it ? Thank you
  4. Hey, I'm currently working on a script that automates the import of certain Facebook posts. The script basically requests all the Facebook posts (combined with Images). It loops through all the posts and stores these within Processwire. I did this because I experience the Facebook API as very slow. I will run a Cronjob on this "hidden page" that imports the posts every 10-15 minutes. These posts are then loaded directly from Processwire so the API doesn't affect the loading speed of the page. I experience a minor issue that keeps me from importing all posts correctly. Some images (from the Facebook API) are given through some kind of "safe-image url" - like this: https://external.xx.fbcdn.net/safe_image.php?d=xxxxx&url=https://www.facebook.com/ads/image/?d=xxxxx Regular images (in comparison to this one) are given like this: https://scontent.xx.fbcdn.net/hphotos-xtp1/v/t1.0-9/s720x720/xxxxxx.jpg?oh=xxxxxx&oe=xxxxx Processwire has no problems with storing the images with the url as stated above this line. The "safe-images" however are causing some problems as I experience the following error: Error: Exception: Unable to copy: https://external.xx.fbcdn.net/safe_image.php?d=xxxx&url=https://www.facebook.com/ads/image/?d=xxx-xxxxx-xxxxx=> C:/wamp/www/abelle/site/assets/files/1335/d_aqksuwuaixz-djme44retrvs0th_wzpccib0ojqqb9lknelwusfkjvchyncx0pywb4q8k6iac9rf25kolvgy7nczw96myatyf8u6ap4gi2_cvdj-escwqhmb8dgb.com_ads_image__d_aqksuwuaixz_djme44retrvs0th_wzpccib0ojqqb9lknelwusfkjvchyncx0pywb4q8k6iac9rf25kolvgy7nczw96myatyf8u6ap4gi2_cvdj_escwqhmb8dgbafl1ikir_cs1gmmxhwwwfo_nlxez (in C:\wamp\www\abelle\wire\core\Pagefile.php line 117) I'm wondering if anyone has experienced this same problem before. I am using the following little script to store the image within the back-end of my project. foreach ($array["posts"] as $post): // Get the specific id $id = $post["id"]; // See if there is any pages with the ID yet $spider = $pages->find("title=$id"); if ($spider->count() != 1): // Set the counter echo "<li>$i: New record found</li>"; // Set all the information $new = new Page(); $new->template = "news"; $new->parent = $parent; $new->save(); // Parse the variables, check valid if needed $new->title = $post["id"]; $new->post_id = $post["id"]; // Check for these if (!empty($post["message"])): $new->post_message = $post["message"]; endif; // Check for these if (!empty($post["story"])): $new->post_title = $post["story"]; else: $new->post_title = $post["id"]; endif; // Declare the time $new->post_date = date_format($post["created_time"], "d-m-Y H:i:s"); // Check for these if (!empty($post["message"])): $new->post_message = $post["message"]; endif; // Check for these if (!empty($post["full_picture"])): // Grab the url $url = rawurldecode($post["full_picture"]); // Parse it to the backend $new->post_full_picture = $url; echo $url; endif; // Save the page $new->save(); else: // Set the counter echo "<li>$i: Original record found</li>"; endif; // Increment the counter $i++; endforeach;
×
×
  • Create New...