Jump to content

hollyvalero

Members
  • Posts

    111
  • Joined

  • Last visited

About hollyvalero

  • Birthday 09/14/1962

Contact Methods

  • Website URL
    http://hollyworks.com
  • Skype
    hollyvalero

Profile Information

  • Gender
    Female
  • Location
    Maine

Recent Profile Visitors

1,493 profile views

hollyvalero's Achievements

Sr. Member

Sr. Member (5/6)

22

Reputation

  1. This is my dumb question for the week. 🤪 I like to clean up unneeded server files... and over time I see a few duplicates with a "." in front of the name... with duplicates below that don't have the leading dot - I assume the .dotVersion is a saved version after a more major upgrade. Should I delete the .TextformatterVideoEmbed ? Any reason to keep it?
  2. While I was looking for a workaround to my MarkupSimpleNav borking over multiple items separated by a pipe: 'selector' => 'template!=home|blog|category' I did an update of a production site and found a similar problem with: $features = $pages->find('template=post|articleblog, limit=1, sort=-date'); Which makes me wonder if this is a pagefinder.php selectors problem and not markupsimple nav? Everything in this installation was 100% up to date EXCEPT the (Dev) upgrade and when I updated that, this OR-condition not supported showed up.
  3. Hi, this used to work when using MarkupSimple Navigation - trying to omit certain pages so "Blog" would appear in the top menu, but there wouldn't be a dropdown menu with endless posts... $treeMenu = $modules->get("MarkupSimpleNavigation"); $rootPage = $pages->get("/"); $options = array( 'current_class' => 'current-menu-item', 'has_children_class' => 'parent', 'max_levels' => 2, 'outer_tpl' => '<ul id="main-menu">||</ul>', 'inner_tpl' => '<ul class="sub-menu">||</ul>', 'item_current_tpl' => '<strong>{title}</strong>', 'selector' => 'template!=post|glossary|category' ); echo $treeMenu->render($options, $rootPage); // render menu EDIT: Played around a bit with this, and it does work with one template as the divider | is what is causing the problem, so this works and if you have only one template that needs this, you're set. 'selector' => 'template!=bloghome' Second edit: I think this was triggered by DEV update 3.0.183 - so this should fix itself, but leaving this here in case anyone has a similar problem....
  4. What I am trying to do: On a blog post page, I am adding a small snippet at the bottom that has the 2 most recent blog posts by the current page author, excluding the blog post title that we are actively reading. That part works... // if this page has an author listed, s/he becomes the active $author and this page is the $activepost if ($page->cbpage2->id) { $author = $page->cbpage2; $activepost = $page->title; // Get the posts... $articles = $pages->find("template=post, cbpage2=$author, limit=2, title!=$activepost, sort=-cbdate" ); // and then format the results for each found... foreach ($articles as $article) { echo "..."; } One author post had a comma in the blog post title which broke this, and I assume this needs to be santized because I reference title!=$activepost this didn't work... $articles = $pages->find("template=post, cbpage2=$author, limit=4, title!=$activepost, sort=-cbdate" . $sanitizer->selectorValue($title)); I assume I have to sanitize BEFORE: $pages->find since it's dragging in the comma, but since I have the $activepost = $page->title; No method I've tried seems to be working. Rather than tell everyone "don't use commas!" I'd love to figure this out, but coming up with tragic results like: $dirtyarticles = $pages->find("template=post, cbpage2=$author, limit=4, title!=$activepost, sort=-cbdate") $cleanarticles = $sanitizer->selectorValue($dirtyarticles)); and that sure isn't right... 🤪
  5. @Robin S - thanks! That worked beautifully.
  6. I've been using this approach for just what you mentioned... shortening blurbs and tucking them into a page with several other items of like type... but this works great but launders out numbers... So something like "Average temperature data for each month from 1880 to 1990 to is displayed"... Comes out as "Average temperature data for each month from to to is displayed"... I see a code mention of mixed, for a mixed string, but can't figure out how to incorporate it...
  7. EDITING TO ADD FIX: after comparing the two installations, one had Hannacodehelper still installed - so I deleted that and it's working just fine now. I have a website with a lot of charts in Hanna Code snippets. When trying to edit pages, getting a big fatal error - which is new. When I installed this it was working fine, so something since then seems to have triggered it. Fatal Error: Undefined class constant 'DEFAULT_OPEN_TAG' (line 111 of site/modules/HannaCodeHelper/HannaCodeHelper.module) - everything is up to date - PHP version is 7.3 - compiled files cleared - cache cleared Error log in PW says: Fatal Error: Undefined class constant 'DEFAULT_OPEN_TAG' Line 111 of /site/assets/cache/FileCompiler/site/modules/HannaCodeHelper/HannaCodeHelper.module Referring to: // basic settings $data = $this->modules->getModuleConfigData('TextformatterHannaCode'); $openTag = isset($data['openTag']) ? $data['openTag'] : \ProcessWire\TextformatterHannaCode::DEFAULT_OPEN_TAG; $closeTag = isset($data['closeTag']) ? $data['closeTag'] : \ProcessWire\TextformatterHannaCode::DEFAULT_CLOSE_TAG; Front end is working fine, and overall backend is accessible. Any clues?
  8. In a blog, I have a page field that references a library of writers (cbpage2) so their info doesn't have to be reentered for each post. At the bottom of the post I wanted to list, " the last 2 posts by THIS AUTHOR, but obviously not include the CURRENT PAGE POST" EDITING TO REMOVE ALL BUT THE apparent answer When I used title to match the variable $activepost it seemed to break - title too long? But when I matched it to the ID it seemed to work... $author = $page ->cbpage2->id; $activepost = $page->id; $articles = $pages->find("template=post, limit=50, cbpage2=$author, id!=$activepost, sort=-cbdate");
  9. I noticed this too in 3.0.173 and when I rolled back to 3.0.172 it went away.
  10. Pagination usually works just fine. I had 2 identical production sites - I was updating code in one when I found the pagination for a publication library was not working. MarkupPagerNav was the same in both (image 1) But the Dev version was different. (image 2) 3.0.173 was NOT paginating Pagination was working in the one with the older DEV (image 3) 3.0.172 Until I updated that installtion to 3.0.173 After the update it delivers the correct URL, but a 404 page (image 4) I rolled back the update to DEV 3.0.172 (image 5) and pagination is working fine... So... fixing this is above my pay grade 🤪
  11. I have a text field called tweet. I'd like to display it: $tweet: This is a sample tweet to @hollyvalero using a #hashtag, or #twotags and create a tweet button to convert that tweet as postable... I've removed the whitespace and replaced it with + signs if ($item->tweet) { $tweetable = $sanitizer->removeWhitespace($item->tweet, ['replace' => '+']); echo "<div class='twitterformatted'>{$tweetable}</div>"; } this gives me: This+is+a+sample+tweet+to+@hollyvalero+using+a+#hashtag,+or+#twotags in a link tag, the @handle works fine, but I need to replace the #hashtag with %23hashtag Trying to use a two-step approach with sanitize->chars but I don't see how to turn: $replacement = '' into replace # with '%23' ... $hashtag = $sanitizer->chars($item->tweet, '%23' = '#'); $tweetable = $sanitizer->removeWhitespace($hashtag, ['replace' => '+']); How do I word this?
×
×
  • Create New...