Jump to content

j00st

Members
  • Posts

    48
  • Joined

  • Last visited

Everything posted by j00st

  1. @kixe thanks for the reply! Makes sense – I hadn't really thought about security holes before. Do you have any idea how I could go about doing this? I guess I can't really set a Cookie for a URL that's forwarding right...if it was a hard redirect there wouldn't even be an issue. But as the URL will remain, I guess the Cookie-pop-up will stay put then, as it's actually asking to set a cookie for a different 'domain' (url) :s If anyone has tips...I would be very grateful.
  2. @Can first off; thanks for the awesome module, as Simon mentioned a few comments back, with the GDPR up and running now, it's been a great help in setting up cookies across multiple websites ? cheers! I have one specific question though – perhaps I'm not looking hard enough – but I have some domains set to internal forwarding. So these URLs will show the exact same at referdomain.com as on maindomain.com. But, as the cookieDomain field is set to maindomain.com, it keeps showing up on referdomain.com even after you accept. Is there a way to make an Array (or add multiple domains ins some other way), so all the referral domains are included for the cookieDomain? Or should I be looking in a different direction to fix this? Curious to hear anyone's thoughts on this!
  3. Thank you for setting this up @BitPoet!! I myself don't completely understand the internal processes of ProcessWire yet – but I'm happy others do and can write this up cheers!
  4. Thanks for pointing these out @gmclelland! I reckon you're right – would love to see it implemented though
  5. Thanks for the heads-up @matjazp Didn't rename any yet, so good timing there! @Zeka : that seems fair enough, wishful thinking on my part perhaps that because the _end is generated by ProcessWire on creating the fieldset, I was hoping it would also do that on cloning....laziness on my part there
  6. Hi everyone! Perhaps I'm a bit enthusiastic in using the Repeater-field & FieldsetOpen combo, as I've already posted another question about it today... But here goes nothing I've got a FieldsetTabOpen which I'm using in a Repeater-field, but that's not working as expected; as in – no tabs showing Instead it just shows the two grouped in FieldsetTabOpen below each other...would be great to see tabs in the repeater as well. To add some visuals in; In the attached images the fluor-green box is my repeater, with two checkbox fields, and after that the two FieldsetOpenTab groups. The other two are how I set up the fields in the repeater (Reno AdminTheme) and the current view in the CMS. Any tips/recommendations as to how I could go about setting this up? I've tested the FieldsetOpenTab elsewhere, it works perfectly – but then again, here I'm trying to use it in a Repeater instead of directly in a template....would I need to place the two tabs in a fieldset? Or some other ingenious construction-ideas that could help out here? Hope someone has an idea as to how to do this! Thanks!
  7. Hi All, perhaps I'm missing something obvious, but I've been working with the Fieldset a while now (and loving the combination with repeater-fields ), but yesterday I stumbled upon the following; When creating a fieldset, ProcessWire automatically generates and _END field as well, right? As I wanted to have to fieldsets in tabs, but with similar content, I decided to clone the fieldset. Doing so DID create a new fieldset, but NOT an additional fieldset_END for this fieldset. Additionally , it looks like the cloned fieldset is also linked to the previously created fieldset_END of the initially created one. Practical example (my steps in this case): Make fieldset four_columns ProcessWire generates four_columns_END Clone four_columns fieldset, as three_columns (currently) DONE! Leaves me with four_columns, four_columns_END and three_columns (but no three_columns_END) Is there another way I should go about doing this? Or am I missing some setting? Or is this something in ProcessWire? Looking forward to see reactions! Cheers all!
  8. Wow! Thanks for all the examples @Sérgio & @Robin S! I'm going to run through them again, and see how I can best put them to use! If this won't work, I don't know what will Thanks again!
  9. Hi Sérgio and Robin, thanks for your quick replies! @Sérgio; yes, that would be the result, with the tag clickable to show the connected articles. Is this something you're familiar with in setting it up? And with my suggestion to showing the related articles would you refer to Robin's plugin? @Robin S; Ah good, I'll definitely have a look at the module! Just read through the page quickly, and the basis of it would be for me to link a Pagefield 'articles' on each Tag page, and on the Article use the existing Pagefield Tags, correct? And to perhaps complicate it; If I also want to connect the authors of articles to a tag, this would be another connected field pair right?
  10. Hi Everyone! Wondering if the community can help me out on the following issue I'm struggling with; I'm using a Page titled Tags, with children Pages for separate Tags (a Tag, maybe obvious, but still...) These tags are being used as...tags! From a dropdown on the article-page in the CMS. Works like a charm. But... I actually want to use these tags as cross-reference as well. Basically I want to make a page with all tags on it, and for each tag have a list with all the Pages it's connected to (and preferably even pull content from those pages). Might be I overlooked a previous post on this subject, or that there's a Module for these kind of things, but since I couldn't find anything so far, I thought I'd try my luck here! Ideas, options, solutions, suggestions...all welcome! Thanks!
  11. Hi Arjen, thanks for the fast reply – I thought something like that might be the case I'll have a look at the CroppableImage. Thanks!
  12. Hi All! I just did an update on one of my ProcessWire sites, updating from 2.7.something to 3.0.42. As you might have already guessed I'm using the CropImage module...hence the title of the Topic. The thing is, as the 3.0.42 version has a hover-state for images, I can no longer access the button to generate the thumbnail/cropped image (titled news-home in this case). As I'm using these on the overview pages of my website they are quite important I checked if there is an update for the module, unfortunately not, so I'm open for any suggestions... Different module, or is it possible within the new version already?
  13. Hi Horst, yes, I came to a similar conclusion; the additional arrays only makes everything more difficult. Or rather, I'm making it more difficult then it should be... I wanted to use them though, because I needed to access the same entry (say entry #1) from three different fields. Kind of confusing to be honest. I just changed it over to using the description and tags field, as you suggested, as I only needed two other fields to arrange everything. So this way I can also stick with the getRandom, instead of needing the rand() function. The description field is now used for the project-url, and the tags field to check if the text on the image needs to be inverted or not. Works like a charm! Didn't know about the images-extra module though, so that's a good one for future reference, thanks! And the count which is 1-based vs the array was also something I was struggling with before/encountered earlier, but now managed to completely avoid!
  14. And a small update; I changed the random selection to using the eq() function, and now the link (from the linked projects array) works perfectly, but the imageArray is still throwing an error. Three test-cases; 1. $selected = $h_images->eq(0); Finds the image if I echo $selected, and returns the following as well (doing this to double-check): echo $selected->url.'<br>'; $index = array_search($selected->url, $header_imgs); echo $index.'<br>'; But then throws an error: Fatal error: Uncaught Error: Method name must be a string in /Users/JCN/Sites/ffa/wire/core/WireArray.php:1648 - So here it's actually not finding the link in the other array?? 2. $selected = $h_images->eq(1); Works like a charm, get all requested items echoed, and link is correct, no problems on this one. 3. $selected = $h_images->eq($rand_nr); when selecting the [0] from the array, still the same error as above, but additionally (another refresh/random) the following occurs; Notice: Trying to get property of non-object in /Users/JCN/Sites/ffa/site/templates/home.php on line 15 /ffa/projects/color-changing-facade/ Not sure what is happening here, but it seems it cannot access the first image here, but does have access to the first link in the other array...kind of frustrating. If there's more I can debug or check to improve what we know, please do share. Thanks for all the help so far!
  15. Well, I started off with the getRandom function, but then the function of the 'random background-image' changed dramatically; I needed a way to invert the text on the background-image (black/white depending on image) AND the images have to link through to projects elsewhere on the site. Brainfart; Maybe it's easier to add an extra image-field to the project and load them from there...instead of going through all this...any way; At the moment I have the background-images-field ($header_image) and a list of selectable projects ($hlinks) on the home template. So I was hoping to use the rand() function to find which position from the first array was selected, so I can also grab the linked project from the other array at the same position. Which works fine, except for the initial (0) one, as mentioned before. Also, right now I'm using the description field ($h_desc) of the image to invert (as mentioned above) when necessary. Current code: $h_images = $home->header_image; $rand_nr = rand(0, $h_images->count()); //$selected = $h_images->getRandom(); $selected = $h_images($rand_nr); $image = $selected->url; $h_desc = $selected->description; $header_imgs = array(); $invert_b = array(); $hi_links = array(); $hlinks = $home->header_image_links; foreach($h_images as $img){ $img_loc = $img->url; array_push($header_imgs, $img_loc); $img_descr = $img->description; array_push($invert_b, $img_descr); } foreach($hlinks as $link){ array_push($hi_links, $link->url); } $index = array_search($selected->url, $header_imgs); if($hlinks($index)){ echo $hlinks->eq($index)->url; } Yes, at the moment I'm testing with four images in there... Could you perhaps also explain the difference between your code and the one I'm using right now, I've never used the eq before for this: $image = $arrayTitle->eq($iRand); // VS $image = $arrayTitle($iRand); Cheers!
  16. Hi Horst! thanks for the quick reply! Ah, fair enough, might be good to share what's in the array indeed; It's actually an imageField, with multiple images in it. Formatted value for the field is Automatic, as I'm using this field on different pages, which in some case will only have one image, and other places multiple. The images are more or less equal if I look at dimensions, size, and titles (just numbers, letters and dashes and underscores). Don't think anything is out of the ordinary there... Anything else I can check?
  17. Hi all! having some trouble working with the getRandom - or actually, getting it to work another way. I'm currently selecting a random image from an imageArray by using the getRandom function. Now I want to know which image it picked though, so I thought of using php's own rand() function this way: rand(0, $arrayTitle->count()); Works like a blast, until it hit the first image at $arrayTitle(0)... I get the following error: Error: Uncaught Error: Method name must be a string in /Users/JCN/Sites/ffa/wire/core/WireArray.php:1648 Stack trace: #0 /Users/JCN/Sites/ffa/site/templates/head.inc(12): WireArray->__invoke(0) #1 /Users/JCN/Sites/ffa/site/templates/home.php(1): include_once('/Users/JCN/Site...') #2 /Users/JCN/Sites/ffa/wire/core/TemplateFile.php(182): require('/Users/JCN/Site...') #3 /Users/JCN/Sites/ffa/wire/core/Wire.php(398): TemplateFile->___render() #4 /Users/JCN/Sites/ffa/wire/core/Wire.php(333): Wire->runHooks('render', Array) #5 /Users/JCN/Sites/ffa/wire/modules/PageRender.module(422): Wire->__call('render', Array) #6 /Users/JCN/Sites/ffa/wire/core/Wire.php(398): PageRender->___renderPage(Object(HookEvent)) #7 /Users/JCN/Sites/ffa/wire/core/Wire.php(333): Wire->runHooks('renderPage', Array) #8 /Users/JCN/Sites/ffa/wire/core/Wire.php(459): Wire->__call('renderPage', Array) #9 /Users/JCN/Sites/ffa/wire/core/Wire.php(333): Wire->runHooks('render', Array) #10 /Users/JCN/Sites/ffa/wire/modules/Process/ProcessPageView.module(187) (line 1648 of /Users/JCN/Sites/ffa/wire/core/WireArray.php) ...all other images work fine though. Is this something I can fix in the .htaccess? And how come I've never had this before, in other projects? Love to hear your take on things... cheers!
  18. Little update - in case people stumble across this page; I've switched to Textile, which works marvels for the VideoEmbed...still not sure why it didn't work with markdown though. So Steffen, thanks again for this tip! Couldn't fix the ImageTags, so ended up making 'sections' (child-pages) for a page, and adding images at the top of a section, continuing the text after that...
  19. Hi Steffen! Thanks for the input. VideoEmbed: Hmm. ok, so maybe chaning to Textile might be worth the trouble. ImageTags: Right now I'm addressing one images from the array of images in the field called 'images' I've had this field set both to Automatic as well as Array of Items as options for the formatted value of this field. In the actual textfield it looks like this: ###temperature and colour {images:2} ##EXPERIMENTS @Francesco: yup, double-checked those. Current order is as follows: - Markdown/Parsedown Extra - 
Image Tags 
 - Video embed for YouTube/Vimeo
 Tried flipping the Markdown & Image Tags but still gives the same error.
  20. Hi everyone! Although I've set up a couple of sites using Processwire now, I still run into typical 'Getting Started' errors - and I figured this is yet another one... On the previous site I built (locally and on a server) I had no problems with modules (downloaded them, placed them in the folder, installed, worked) but this time around two of the modules I want to use are not working. I'm using a textarea with Markdown (Parsedown Extra to be more precise - which works fine), but on the same textarea fields I want to use both the TextFormatterVideoEmbed (for YouTube & Vimeo) and the ImageTags (for embedding from the images field on the same page) Current situation for: VideoEmbed – Link is shown as link. ImageTags - Throws the following error Notice: Array to string conversion in ../site/modules/ImageTags/TextformatterImageTags.module on line 20 Should I use a different version of Markdown? (Haven't tried that - just realised it while typing this post...) I have the feeling I might be overlooking something really obvious, but I can't put my finger on it. Suggestions? Tips? Cheers!
  21. Hey nik & Soma! first off; thanks for the quick replies! Both right - I did have the 'advanced' disabled, so I didn't see the ->next, won't make that mistake again anytime soon, and indeed, some php was to be learned, the curly braces did it! I ended up using ->name, because I'm echoing it into an href reference, and using hashchange event to scroll down to the correct page it's working now though, so thanks again!
  22. Hi guys and gals! I'm pretty new to ProcessWire, and trying to figure out as much as I can myself, but I'm totally stuck on this little piece though. • I've got a one-page scrollable site, and am using hashtags to jump to the next area (which is incidentally of course also a $page) • what I'm looking to do is link the next-page to an href, so I figured I could use $page->next, but that gives me a number (1007 in this case). Same goes for the siblings. What I thought would happen would be the following; just as $page->name gives me the current name (and thus the current hashtag) I figured 'next' would give me the name of the 'next' page. But I probably didn't do my homework. $page->next->name gives me 1007->name so that clearly isn't working. So to end this query: How do I get the name of the next page displayed so I can use it in my href? thanks for the help! p.s.: ->next is shown here: http://processwire.com/api/variables/page/ but not here: http://processwire.com/api/cheatsheet/
×
×
  • Create New...