joer80
Members-
Posts
364 -
Joined
-
Last visited
Everything posted by joer80
-
The overview so far: Assuming a Basic-Page.php template, import the module at the top of the page, and call the buildRows function passing in your page var where you want them placed. (If you want it to inject css, you may need to call a buildCSS function in the head section also.) The module would look at the field names tied to the page in the correct order, and look up the correct include file, and return that row html with the data from the page placed in it. I could have a folder structure like this so you could switch which frontend framework you wanted to use: bootstrap/ foundation/ bootstrap/content/ bootstrap/content/50-50-Content-Image.php bootstrap/content/75-25-Content-Image.php bootstrap/content/100-H1-Body.php bootstrap/content/100-Buttons.php I could also add a background image field just in case you want to upload a background image for that group. Maybe could add a checkbox if you want it to be parallax or regular? Just my thoughts!
-
I dont think PageTable or PageTableExtended is what I am after. You seem to be required to have a template file in your root for each one, with fields tied to each template. I don't want all of my row possibilities in my root, and I cant make a generic template file because all fields I would ever use would need to be tied to it, and I dont want every field in every row. I think repeater will work because I am not required to put the template in root. I can include that snippet from a more organized source located in my module directory. I just wish there was a way to remove the add new button on rows that do not support more than one. I may see if I can mess with it some more soon!
-
I have code that adds a remote image to a page that works great, but I want it to run and copy over the old image instead of adding it again and having both on the page. Is there a way to tell it to replace the old one? This is what I have so far: I first pass a | delimited string saved as $imageArray into this: $m->setOutputFormatting(false); foreach($imageArray as $image){ if($image){ echo "Saving " . $image . " to " . $m->id . "<br>"; $m->images->add($image); } } $m->save(); Thanks!
-
What this module does, is make the new dashboard page the new home for the admin section, instead of the page list, so shouldnt the process wire logo and breadcrum also go to this new home since that is where the login script takes all users after they login?
-
Repeater would be great if it was possible to give it a max number of entries and it would turn off the add button after say, 1 of group of items was added. Or how ever many your row is designed to hold. PageTableExtended may be perfect for what I am after. I will take a look tonight!
-
I worked on a new field that is like the repeater but does not repeat last night but did not finish. If you guys think of a better way, let me know! I will keep trying!
-
I installed this and it seems a non admin user with dashboard permissions can see the dashboard or page list, but they can not click on the processwire logo to go back to the admin home / dashboard link. It does a redirect loop. They can only click the tabs on the right. They also can not click admin in the breadcrumb trail on the page list to get back to the dashboard. Do you know how to fix this?
-
Pretty much. I am thinking I may need to make each row I design a repeater field that does not allow new items?
-
My end result would be a module that when installed, would automatically add html to every field on a page as well as inject a css file in your head section. It would also come with some extra fields, that held other fields that you can plop on your template, and move the group around all at once.. ie. You may setup your "Home" page with these fields and move them around to change their order: TitlewithBackground - Contains sub fields of H1 (text), Background (image) Body Row with picture - 2 columns that contains 1 text area and photo on right (image) Featured Content Row 4 Column Paralax - Contains 4 text areas, one ta for each column, and a paralax image background. etc. The idea is to allow someone to download a module, and use the fields it comes with to build a website using predefined row groups.
-
I am wanting to make a Markup Generation module, but I am struggling with the best way to do it. What I am thinking so far, is have the template.php file hold the header, run my module function, and then the footer. All content rows would be handled by my module and it would spit out rows. You would pass the $page variable into my function, and it would loop through the $page->field items, and when it got to one, access the field like $page->field. So to create a row on a page, you would just add a field to your template with no need to ever edit the template file. When it gets to a field, it checks another function for what html to surround that data with, and echos both. ie. a PageTitleBackground field group may spit out a div that uses css to set a certain height and width with a background image, and this div may have an H1 inside it as well. The end result would be a row that has a background and an H1 page title. This is working great for rows that can be handled with one field, but I am at a loss with how to group a few fields into one row, but still allow the user to reorder the rows by changing the field order on the template. I can group fields with FieldsetOpen, but the user has to move 3 fields just to reorder a row. (Start, field, close.) I can group them with a repeater, but by nature, it doesn't really repeat and it looks like it might be unnecessary overhead to do it this way? I might could do it, but I would probably have to figure out how to turn off the ability to add another item. Is there another way to group fields? Any advice?
-
This is the code I used: $LogoImage = 'Classic-KIA.png'; //Make the menu //echo the starting code echo '<nav class="navbar navbar-default navbar-fixed-top" role="navigation"> <!-- navbar-fixed-top --> <div class="container"> <!-- Brand and toggle get grouped for better mobile display --> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse-1"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="' . $config->urls->root . '"><img src="' . $config->urls->templates . 'images/' . $LogoImage . '" class="Logo" alt="' . $LocationPage->title . ' Logo" /></a> </div> <!-- Collect the nav links, forms, and other content for toggling --> <div class="collapse navbar-collapse" id="navbar-collapse-1">'; echo '<div id="AboveNav"><i class="fa fa-phone"></i> ' . $LocationPage->Location_PhoneNumber_Switchboard . ' <i class="fa fa-flag"></i> ' . $LocationPage->Location_AddressStreet . ' ' . $LocationPage->Location_City . ', ' . $LocationPage->Location_StateAbrv . '</div><!-- -->'; echo '<ul class="nav navbar-nav navbar-right">'; //Make the top level links $TopLevelNavLinks = $pages->find('parent=1'); //add home link echo '<li><a href="/">Home</a></li>'; //could use $config->urls->root //Build Top Level Links foreach($TopLevelNavLinks as $TopLevelNavLink){ //Look up this top level link to build a drop down if it needs it $SecondLevelNavLinks = $pages->find("parent=$TopLevelNavLink->id, sort=sort"); $SecondLevelTotal = $SecondLevelNavLinks->getTotal(); //If I am on this page, add the active class if($page->id == $TopLevelNavLink->id){ $classTag = ' active'; } else { $classTag = ''; } //if there is atleast one sublink, put me in a dropdown if($SecondLevelTotal > 0){ //Dont make link take user to page. Instead, open a dropdown menu. echo '<li class="dropdown' . $classTag . '">'; echo '<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">' . $TopLevelNavLink->title . ' <span class="caret"></span></a>'; echo '<ul class="dropdown-menu" role="menu">'; //loop through the second level foreach($SecondLevelNavLinks as $SecondLevelNavLink){ //If I am on this page, add the active class if($page->id == $SecondLevelNavLink->id){ $classTag2ndlevel = ' class="active" '; } else { $classTag2ndlevel = ''; } echo '<li' . $classTag2ndlevel . '><a href="' . $SecondLevelNavLink->url . '">' . $SecondLevelNavLink->title . '</a></li>'; } echo '</ul>'; } else { //Make link take user to page echo '<li class="nodropdown' . $classTag . '"><a href="' . $TopLevelNavLink->url . '">' . $TopLevelNavLink->title . '</a></li>'; } } //end of built top level nav links //echo the ending code echo '</ul></div><!-- /.navbar-collapse --> </div><!-- /.container-fluid --> </nav>';
-
I just changed the code that creates the navigation to use the $pages->find('parent=1') instead of the renderChildrenOf function and it made my website much faster! The website went from having a 3-5 second php delivery to a 700ms php delivery. (index.php's time in google chrome.) I am assuming it is because it loads the page information for all pages under your homepage, so if you have thousands of pages, it adds unnecessary overhead vs the parent= which just gets 1 level. Bootstrap only makes use of 2 levels so that is not very efficient. Just wanted to let you know I speed up my website big time by using this method! The slower renderChildrenOf function is used in the Bootstrap 3 site profile in the modules directory. That is why I started off with that. http://modules.processwire.com/modules/process-wire-bootstrap3/
-
To use amazon cloud front, does the file have to be in s3? Or is it possible to have cloud front work with local processwire files? Great plugin! I am bookmarking it. Was just curious how amazon works! Thanks!
-
Just popped out another bootstrap and processwire auto website! I am getting to where I can do these in 1 to 2 weeks now! Uses the bootstrap carousel for the slider, Google maps marker module and the form templates processor module on the detail page. Also using redirects module and batcher. (Redirects for the sub menu items under inventory to send the user to the search page with the correct query strings.) I also use a cron that reads an inventory csv file and makes or updates processwire pages based on the vin number. http://www.classictexarkanakia.com
-
Very nice! Perfect! Just didn't know it existed. I do think this functionality should be in core though, maybe as a setting on the field?
-
Awesome! I will for sure take a look at that!
-
Just popped out another bootstrap and processwire auto website! Uses the bootstrap carousel for the slider, Google maps marker module and the form templates processor module on the detail page. Also using redirects module and batcher. (Redirects for the sub menu items under inventory to send the user to the search page with the correct query strings.) I also use a cron that reads an inventory csv file and makes or updates processwire pages based on the vin number. http://www.greggorrextreme.com/ Thanks!
-
I would like a way to set how many text boxes that can be tied to an image field. ie. I could allow it to make one for description or caption, and one for the hyperlink etc. That would be handy as right now I use the image field type for things like photo galleries or homepage hero sliders and use the format caption|hyperlink in the one description box. (Pipe to delimit.) Not sure if you should be able to name them, or if it would be better just to turn on and off specific ones like $image->hyperlink using the settings page. Just an idea!
-
I think the youtube embed should be in core.
-
As far as scaffolding, I like the bootstrap grid as a starting point. Makes it so easy. It looks like opencart when with it as well for their 2.0. Anyone else have any strong feelings about the layout? I also think paypal payflow pro and express are good to support out of the box. This gives the traditional on site invisible merchant checkout option, as well as a good guest checkout option if the user wants to use express.
- 69 replies
-
- e-commerce
- digital downloads
-
(and 2 more)
Tagged with:
-
I dont have much to add to this convo other than, I cant stand opencart and love processwire, and dread the day I have to do another ecommerce store because I am going to need to make this call.
- 69 replies
-
- 1
-
- e-commerce
- digital downloads
-
(and 2 more)
Tagged with:
-
When Editing Page, Ability to hyperlink an email address
joer80 replied to joer80's topic in Wishlist & Roadmap
That Email Obfuscation plugin is perfect! It auto hyperlinks anything that is an email address, in a way that is not harvest-able. Perfect! -
When Editing Page, Ability to hyperlink an email address
joer80 posted a topic in Wishlist & Roadmap
When you are editing a page, it is possible to highlight a word and hyperlink to a page, but I do not see a way to highlight an email address and hyperlink that. The only way I see if a customer wants to do this is to edit via html, and type mailto: in front of the email address. I know its not the best practice due to spam bots, but users still seem to want to do it sometimes. Thanks! -
I launched another processwire website for the GreggOrrAuto collection. This time for a Marina instead of autos. Uses a variation of the bootstrap template I made for greggorrauto.com. Uses the bootstrap carousel for the slider, Google maps marker module and the form templates processor module. Also using redirects module and batcher. (Redirects for the sub menu items under inventory to send the user to the search page with the correct query strings.) I used the photo/image cropping method for the grid gallery on the sales info pages to keep the photos with different heights all lined up. ie: http://www.greggorrmarine.com/products/pontoons/ Thanks!
-
When your selling cars, its not always practical to sort by a unique id number. Sometimes it is price, sometimes it is make + model, etc. I can confirm it happens without random added with out of the box mysql. I just thought I would mention it since I noticed them jumping around when I would hit page refresh. Adding a second sort fixes it though. I will try to post my selector when I get back to the office! Thanks!