Jump to content

jetag

Members
  • Posts

    18
  • Joined

  • Last visited

About jetag

  • Birthday 02/06/1990

Profile Information

  • Gender
    Male
  • Location
    Paris, France
  • Interests
    street art, urbanism, architecture, processwire

Recent Profile Visitors

1,677 profile views

jetag's Achievements

Jr. Member

Jr. Member (3/6)

2

Reputation

  1. Hi, Is there a way to retrieve a lost admin pass? I remenber there were a php file we could upmload to the root of the site to reset admin user and pass but can't find it. My best
  2. Many thanks AndZyk, was able to retrieve the important.
  3. Hi, I had a bunch of processwire site for try install locally on my mac with MAMP. Since an update of MAMP or macOS it seems that all my database have disapear, I didn't find them in phpMyAdmin. Is there a way to recover my sites? Now everytime I try to open one I have this error: Oops… Error: Exception: SQLSTATE[HY000] [1049] Unknown database 'cotaweb' (in wire/core/ProcessWire.php line 494) #0 wire/core/ProcessWire.php (302): ProcessWire->load(Object(Config)) #1 index.php (52): ProcessWire->__construct(Object(Config)) #2 {main} This error message was shown because: site is in debug mode. ($config->debug = true; => site/config.php). Error has been logged. I have a decade of work there, I'll really appreciate all the help I can have. thanks
  4. Don't be sorry you 've been a great help I finally been playing with the Authors template from the blog profile of Ryan I'm not sure what i did but it works i'm really discovering programming so I take it step by step again thanks for your tips
  5. Thank you Joss you're more a programmer than you admit ;-) I have been playing with the search template but I can't figure out the selector to make it look at created_users_id seems to work for or the fields but not this one ? $matches = $pages->find("title|article_introtext~=$q, limit=50");
  6. Hi, thank you so much Joss, doing your tutorial answered so much of my questions. This step by step was more than useful. I'm trying to push it a step further by sorting the articles with the default field createdUser. so I'm hijacking your category example but I doing something wrong here is the authors functions i have so far function newsList(){ // Grab the page name from the url $thisAuteur = wire("page")->name; // If the category is not called "news" then output the category name as a selector for the find. if($thisAuteur !="jetag") { $auteur = "createdUser.title=" . $thisAuteur; } // Get the news posts - limited to ten for later pagination $newsposts = wire("pages")->find("parent=/news-articles/, $auteur, template=TUT_news, limit=10"); $out =" "; //Loop through the pages foreach($newsposts as $newspost){ $out .="<div class='clearfix'>"; if($newspost->article_thumbnails){ $out .="<a href='{$newspost->url}' class=''>"; $out .="<img class='align_left' src='{$newspost->article_thumbnails->getThumb(listingthumb)}'>"; } $out .="<h3>{$newspost->title}</h3>"; $out .="<p>{$newspost->article_introtext}</p>"; $out .="</a></div>"; } // Pagination $out .="<div class='pagination'>"; $out .= $newsposts->renderPager(array( 'nextItemLabel' => "Next", 'previousItemLabel' => "Prev", 'listMarkup' => "<ul>{out}</ul>", 'itemMarkup' => "<li>{out}</li>", 'linkMarkup' => "<a href='{url}'>{out}</a>" )); $out .="</div>"; echo $out; } /* CATEGORIES LIST This lists available categories */ function auteursList(){ $auteurs = wire("pages")->find("parent=/admin/access/users/, template=TUT_news_index, sort=title"); $out =" "; foreach($auteurs as $auteur){ $out .="<li><a href='{$auteur->url}'>{$auteur->title}</a></li>"; } echo "<ul>$out</ul>"; } Does the createdUsers field works a different way from the other fields or am I just forgetting something in the code? thank you very much for sharing all this
  7. ok this part is already in header my bad
  8. Hi Mats, I assume you were talking about this script <script type='text/javascript'> RCDMap.options.zoom = 15; RCDMap.init('map', {$page->map->lat}, {$page->map->lng}); RCDMap.addMarker('{$page->title}', '{$page->niveau}', {$page->map->lat}, {$page->map->lng}); </script> so I 've tried to move it in the header but it isn'resolving the problem./ thanks thought.
  9. Hi Mats, if you speak about <script type="text/javascript" src="<?php echo $config->urls->templates?>js/RCDMap.js"> </script> it is already just before the closing head tag. Or do you mean the complete code inside RCDMap.js ? In that case wouldn't it will be to heavy to load for each page?
  10. Hi, first I want to thank you all for your help. I'm just a starting to learn php and javascript and processwire is an incredbly wonderful way to do it. As Ryan recommended I look the javascript console. it is returning me an error on the RCDMap.js on line 24 Uncaught ReferenceError: $ is not defined So I change the call of jquery from the footer to the header and now the marker appears but the navigation tool on the map are still bugging. there is no more error in the javascript console. The RCDMap.js is Ryan's one, for the rest of the code I made a zip file with my template code and the map.php that calls the fonction for the map you can download it here. I don't know if you need other files if so let me know
  11. apparently since v3 you don't need an API key anymore unless you have huge needs of maps which isn't my case http://stackoverflow.com/questions/2769148/whats-the-api-key-for-in-google-maps-api-v3 but I'll try it
  12. Thank you Apeisa, I put the link for RCDMap.js and the google API in the head instead of the footer and now my map appears centered on the good point. Don't get why but I'm quite happy Still the marker doesn't appear Though the code output in the source seems good, i got that <div id='map'></div> <script type='text/javascript'> RCDMap.options.zoom = 15; RCDMap.init('map', 48.889828, 2.241181); RCDMap.addMarker('Gouffre de Villon', '1048', 48.889828, 2.241181); </script>
  13. yes #map is width: 350px; and height: 350px; I've also tried it with a width of 100% but nothing seems to work
  14. Hi Mats, thank you for your answer. in my template I add include("./includes/map.php"); and here is my map.php <? echo "<div id='map'></div>"; $js = "<script type='text/javascript'>"; $js .= "RCDMap.options.zoom = 15;"; $js .= "RCDMap.init('map', {$page->map->lat}, {$page->map->lng});"; $js .= "RCDMap.addMarker('{$page->title}', '{page->niveau}', {$page->map->lat}, {$page->map->lng});"; $js .= "</script>"; echo $js; ?> I also add in my footer link to RCDMap.js and to the google API. the source code seems to output well but there must be something wrong as no map appears.
×
×
  • Create New...