Jump to content

Frank Vèssia

Members
  • Posts

    597
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Frank Vèssia

  1. Ryan, i miss something or the new user system is not yet implemented in 2.1?
  2. mmm...i'm trying to use this adminbar but when editing a page i get this error: Template '/home/processw/public_html/site/templates/' is not allowed If i edit the page via admin it works. :-\
  3. looks really interesting... 8)
  4. I like the /lang/ solution because i think we can positioning a website more easily on google in this way... multifields solution is too hard to do, it's like facebook or twitter or big websites do but i guess they don't care about positioning on google... If i want to use this method but using subdomain what i have to do? ex.: http://en.mysite.com/page http://fr.mysite.com/page
  5. i have a dedicated server not hosting, i will try to ask to increase the limit, thanks.
  6. i got this error code in one of my pw site. This website count an average of 4k unique visitors and the home page is very simple. I maybe made something wrong? It happends when i refresh the page, sometimes i get this error sometimes the page loads correctly. Warning: mysqli::mysqli() [mysqli.mysqli]: (08004/1040): Too many connections in /public_html/wire/core/ProcessWire.php on line 88 Warning: mysqli::set_charset() [mysqli.set-charset]: Couldn't fetch Database in /public_html/wire/core/ProcessWire.php on line 92 Warning: mysqli::query() [mysqli.query]: Couldn't fetch Database in /public_html/wire/core/Database.php on line 57 Warning: Database::query() [database.query]: Couldn't fetch Database in /public_html/wire/core/Database.php on line 72 Fatal error: Exception: SELECT id, class, flags FROM modules ORDER BY class (in /public_html/wire/core/Database.php line 72) #0 /public_html/wire/core/Modules.php(128): Database->query('SELECT id, clas...') #1 /public_html/wire/core/Modules.php(73): Modules->load('/home/hdps/doma...') #2 /public_html/wire/core/ProcessWire.php(95): Modules->__construct('/home/hdps/doma...', '/home/hdps/doma...') #3 /public_html/wire/core/ProcessWire.php(45): ProcessWire->load(Object(Config)) #4 /public_html/index.php(151): ProcessWire->__construct(Object(Config)) #5 {main} in /public_html/index.php on line 186 This error message was shown because the site is in DEBUG mode.
  7. I would like to have a tool can export a template with all fields creating .pack file and reimport it in another pw website. It happends many time to me recreating all the stuff and this option can be very useful.
  8. I modified a well done module (thanks to almonk) that shows up facebook like button to obtain a more complete set of social buttons that i always use for my sites. This module can shows facebook, twitter and google+ buttons. Example: <? $like = $modules->get('SocialBlock'); //$like->fbEnabled ='false'; to hidden a button (fbEnabled|twEnabled|gEnabled) $like->fbwidth = '110'; $like->fburl = 'http://www.yoursite.com/page/'; $like->twtext = $page->title; $like->twvia = 'yoursitename'; $like->twlang = 'italian'; $like->gsize = 'small'; echo $like->render(); ?> Module code: <?php class SocialBlock extends WireData implements Module { public static function getModuleInfo() { return array( 'title' => 'Social Networks buttons', 'version' => 006, 'summary' => 'Display Facebook/Twitter/Google+ buttons on your Processwire site.', 'href' => 'http://www.complementaryart.com', 'singular' => false, 'autoload' => false, ); } public function init() { $this->set('fbEnabled', 'true'); $this->set('fburl', ''); $this->set('fblayout', 'button_count'); $this->set('fbshowFaces', 'false'); $this->set('fbcolorscheme', 'light'); $this->set('fbwidth', '150'); $this->set('fbheight', '20'); $this->set('fbfont', 'Arial'); $this->set('twEnabled', 'true'); $this->set('twurl', ''); $this->set('twtext', ''); $this->set('twcount', 'horizontal'); $this->set('twvia', ''); $this->set('twlang', 'english'); $this->set('gEnabled', 'true'); $this->set('gsize', 'medium'); $this->set('gcount', 'true'); } public function ___render() { $social = ""; if ($this->fbEnabled){ if(!$this->fburl) $this->fburl = $page->url; // Build the iframe $social .= '<iframe src="http://www.facebook.com/plugins/like.php?href='.$this->fburl.'&layout='.$this->fblayout.'&show_faces='.$this->fbshowFaces.'&width='.$this->fbwidth.'&action=like&font='.$this->fbfont.'&colorscheme='.$this->fbcolorscheme.'&height='.$this->fbheight.'" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:'.$this->fbwidth.'px; height:'.$this->fbheight.'px;" allowtransparency="true"></iframe>'; } if ($this->twEnabled){ if(!$this->twurl) $this->twurl = $page->url; $social .= '<a href="http://twitter.com/share" class="twitter-share-button" data-url="'.$this->twurl.'" data-text="'.$this->twtext.'" data-count="'.$this->twcount.'" data-via="'.$this->twvia.'" data-lang="'.$this->twlang.'">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>'; } if ($this->gEnabled){ $social .= '<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script><g:plusone size="'.$this->gsize.'" count="'.$this->gcount.'"></g:plusone>'; } return $social; } } SocialBlock.module
  9. Sorry, was my fault...i was browsing the site in another tab so the admin session was still active and let me see the page.. ;D
  10. I need to "unpublish" a page and its children, so i removed "guest" from roles but i still navigate the page. I dont want to delete it... any idea?
  11. Thanks Ryan, i will read these articles
  12. There is no way to set a title attrib on link when using tinymce... (<a href="" title="">link</a>)This is very important in seo and i need to solve this issue, even if i edit manually the code, when saving the title disappears from code. Any solution?
  13. hey Ryan, i'm using this module but now i need to change the title of each item to a custom title composed by the title of the page + a custom fixed text. Now i'm using: $rss->itemTitleField = "title"; i would like to do something like => title+'my text'; Thanks
  14. i solved...the new user function is called remotely buy another ip and this system had a bug, it called the function too many times
  15. i'm getting an error while creating new user via code. guest:/join/new/:ProcessWire Error:Exception: Duplicate entry 'needmore' for key 2 (in /public_html/wire/core/Database.php line 72) It's strange because i call the new user function just one time, user is created correctly but i get this error continuos, 2 times every minute in my email...
  16. I cannot find in documentation a way to delete a user from code.
  17. @Ryan: the counter sounds great!!
  18. amazing, i will use for sure in all of my old websites switched to PW. I guess a good improvement could be adding a selector of pw pages in "Redirect to" with classic tree view so you can choose to write an external url or internal page.
  19. Ok, my fault, i was checking the folder permissions on old website directories and not in the new ;D
  20. I moved a site from one domain to another copying all files. Now when i create a page o trying to edit one i get this error: DirectoryIterator::__construct(/public_html/site/assets/cache/Page/6395/) [directoryiterator.--construct]: failed to open dir: No such file or directory it seems a dir permissions but i checked and i have all to 777
×
×
  • Create New...