Jump to content

daniel.s

Members
  • Posts

    27
  • Joined

  • Last visited

daniel.s's Achievements

Jr. Member

Jr. Member (3/6)

8

Reputation

  1. Is it possible to connect the GoogleClientAPI to Google Analytics? The current module for analytics is quite hard to automate which this API could help do.
  2. I recently found Concierge which supports both chat and video sharing capabilites. As of right now it's totally free! https://live.gotoassist.com/
  3. The Solution above worked well but wont work if i want more control over the template. I got a custom list of pages to work within this module: <?php $p = $this->modules->get('ProcessPageList'); // kongondo's code goes here $p->set('id', 1166); // setting the parent page $pageTree = new InputfieldMarkup; // the placeholder $pageTree->value = $p->execute(); // fill the InputfieldMarkup form field... echo $pageTree->render(); //or return if in a function... ?> But is there any way to do this for ProcessPageEdit for a specific page? (In my case a settings page)
  4. How do i use a regular page as an admin page, in this case a settings page with a template who has no file attached to it. My problem is that the module requires a php file to output data, all i want is to have my /settings/ page in the top menu of the admin, no custom markup whatsoever. I have used this tag from here: if($page->template=="admin" && $page->name=="settings") $input->get->id = $pages->get("/settings/")->id; The problem with this is that it will automatically use the "ProcessPageEdit" Icon. My question follows: How do i get my /settings/ page to the top meny using this Module?
  5. Thanks! The documentation for Klarna seems to be good. If the connection is possible i will definitely use this for projects in the future!
  6. Great! I'm building a system for menus for a restaurant website and don't know the how the customer wants the sub-categories for the menus (Starters, Main, Desserts). My thought was to let the repeater take care of the sub-categories and the table stand for the individual dishes. Is this a valid way of doing this?
  7. Is it possible to put ProFields: Table in a repeater field?
  8. Is there any possibility getting Klarna Checkout to work with this? https://developers.klarna.com/en/no+php/kco-v2/checkout How much work is it to implement?
  9. The script has been working really great for a year now but for some strange reason it's decided to stop working. Can't find any deprecated code used in the code and the shortened url's comes up in my goo.gl account but won't work in the $page->links field. Anyone have a clue what's wrong? Been scratching my head trying to figure this out for days now if($page->links) { $short = $page->links; } else { $shortUrl = $client->shorten($config->httpHost . $page->url); $page->of(false); $page->links = $shortUrl["id"]; // About here something's going wrong $page->save('links'); $short = $page->links; }
  10. Hello, I'm using a function to limit an entry to a predetermined number of characters. This is what it looks like: <?php // Excerpts a field to $limit length function excerpt($str, $limit = 400, $endstr = '…'){ $str = strip_tags($str); if(strlen($str) <= $limit) return $str; $out = substr($str, 0, $limit); $pos = strrpos($out, " "); if ($pos>0) { $out = substr($out, 0, $pos); } return $out .= $endstr; } ?> It works like a charm but sometimes i want to limit two different fields within the same function: <?php echo excerpt($result->summary. $result->body); ?> This works 'OK' but this way i can't get a space between the summary text and the body text. It's i minor issue but it looks kinda dull. For example: "Hello, this is the summary.And this is the body text." My PHP knowledge is low but my guess is that the problem arises with the "strip_tags" function. Is there any way around this? Thanks for help /Daniel
  11. Hello! I'm having some trouble with the plugin. I've used Ryan's basic-form.php.txt file as a boilerplate and get the success message and all but it's seems i'm not receiving any mail to the linked email account. Tried 2 different accounts. It's for a launched site and it would be unfortunate if sent mails got lost. Is there an easy way to save the form as a child page to the parent like with this code: $form->parent = $page; // optional, saves form as page I'm really stuck, been trying all night to get this to work. Help would be highly appreciated Edit: Solved it through changing from mail to wireMail and installing the Swift Mailer module. mail($emailTo, $subject, $message, "From: $form[email]"); To wireMail($emailTo, $form[email], $subject, $message); Thanks!
  12. I'm having a problem with the special characters "åäö" turning up strange when the content is emailed. Is there anyway to support Swedish letters when using the mailing function?
  13. Wow! Thanks everyone. I'll try implementing this in a few hours.
  14. <?php require_once('Googl.class.php'); $googl = new Googl('YOUR_API_KEY'); if (!$page->shortUrl) { page->$shortUrl = $googl->shorten('http://www.google.com/'); } ?> How can i do the if statement if the field isn't populated already? is !$page->shortUrl or how can it be done. And do i need to get something like $field->set($key, $value) ? Im not that great with PHP, thanks for all the help. /Daniel
  15. I noticed the script makes a new shortUrl for every visitor. I understand this is due the script is run every page load. How can i get a static short url for every page using the template instead of loading a new short url every page load?
×
×
  • Create New...