Jump to content

doolak

Members
  • Posts

    319
  • Joined

  • Last visited

Everything posted by doolak

  1. Got it... The problem was the following part: var ref = $(this).parents().eq(1).attr('class'); $(ref+' .pic_1 img').fadeOut(400,function(){ As the variable "var ref"would be e.g. "galerie_images ref_2" it was resulting in the following script: $(galerie_2 ref_2 .pic_1 img').fadeOut(400,function(){ ...but it should be: $(.galerie_2.ref_2 .pic_1 img').fadeOut(400,function(){ So I changed the CSS class in the HTML as follows: before: <div class='galerie_images ref_1'> after: <div class='galerie_images_ref_1'> And the Javascript as follows: var ref = $(this).parents().eq(1).attr('class'); $('.'+ref+' .pic_1 img').fadeOut(400,function(){ Now it's working fine ;-)
  2. Hi there, I am trying to make a little image switcher for a portfolio page with jQuery, but I cannot get it work properly. The portfolio looks like this (atm just 2 items for testing...): I "just" want to receive the following: if one click one of the thumbnails, this image should be swapped with the main image of that portfolio item. It works fine so far, I just cannot restrict it to one portfolio item - it changes always both items. So i tried to safe the parent's class in var ref and add this to the selector which should be changed. The alert show the correct class, but it just does not work... Here the HTML code: <div class='references-item ref_1'> <div class='galerie_images ref_1'> <div class='galerie_image ref_1 pic_1'> <img class='galerie_thumb' src='/pw/site/assets/files/1013/alusi_1.400x267n.jpg' /> </div> <div class='galerie_image ref_1 pic_2'> <img class='galerie_thumb' src='/pw/site/assets/files/1013/alusi_2.400x267n.jpg' width='160' /> </div> <div class='galerie_image ref_1 pic_3'> <img class='galerie_thumb' src='/pw/site/assets/files/1013/alusi_3.400x267n.jpg' width='160' /> </div> <div class='clear'></div> </div> <p><span>Kunde: </span>Alusi <span>Branche: </span>Kerzendesign</p> </div> <div class='references-item ref_2'> <div class='galerie_images ref_2'> <div class='galerie_image ref_2 pic_1'> <img class='galerie_thumb' src='/pw/site/assets/files/1014/awi_1_gross.400x267n.jpg' /> </div> <div class='galerie_image ref_2 pic_2'> <img class='galerie_thumb' src='/pw/site/assets/files/1014/awi_3_gross.400x267n.jpg' width='160' /> </div> <div class='galerie_image ref_2 pic_3'> <img class='galerie_thumb' src='/pw/site/assets/files/1014/awi_2_gross.400x267n.jpg' width='160' /> </div> <div class='clear'></div> </div> <p><span>Kunde: </span>AWI <span>Branche: </span>Deutsche Automatenwirtschaft</p> </div> and here the jQuery I am using: jQuery(function($){ $('.pic_2 img').click(function() { var thmb = this; var src = this.src; var ref = $(this).parents().eq(1).attr('class'); alert (ref); $(ref+'.pic_1 img').fadeOut(400,function(){ thmb.src = this.src; $(this).fadeIn(400)[0].src = src; }); }); }); jQuery(function($){ $('.pic_3 img').click(function() { var thmb = this; var src = this.src; var ref = $(this).parents().eq(1).attr('class'); alert (ref); $(ref+' .pic_1 img').fadeOut(400,function(){ thmb.src = this.src; $(this).fadeIn(400)[0].src = src; }); }); }); Has anybody an idea what's wrong? I would appreciate any help! Cheers, Christian.
  3. Had to restart the apache manually via commandline - now the error message in the apache logs is away and the installation does not show the PDO problem - will try now to install. Success! So the problem with the missing PDO warning came from a corrupted php.ini Thanks again for your help!
  4. Thanks a lot for your help, kongondo! This looks helpful!
  5. PHP version is 5.4.31 MySQL was 5.1 - now I have upgraded to 5.5
  6. Yes, I found that too - I am trying to fix this and hope this will fix the installation problems...
  7. In the Apache logs I found this: So I checked the php.ini:
  8. Ok - in the other thread the host had a problem and fixed it - I am still getting that warning in the installation's compatibility check. If I just try to install I can enter the database informations and if I continue then the install gets stuck and looks as follows: So far no solution...
  9. Ok - got that MySQL update problem fixed - the other sites are running again now. Puh... Will have a look at that thread now, thanks, kongondo!
  10. I tried to install the newest version - the I tried to install an older one. Now I made the big mistake to run an upgrade of MySQL and now the other sites throw a 500 internal server error... Have to fix this now first! OMG
  11. Damn - I have no idea what's wrong - I cannot install PW...
  12. Hi there, first time since I am using PW I am getting this error message: I am using the same server like always and PDO is installed. The installation stops after entering the database infos and nothing happens. Any idea what can be wrong? Cheers, Christian
  13. Hi there, somehow I cannot get the localization work in an external script... I don't need to verify which language is actually set - just need to tell the script that it should display one specific language and tried it as follows: include("/home/xyz/public_html/pw/index.php"); $lang = wire("languages")->get("en"); wire()->addHook("Page::localUrl", null, function($event){ wire("modules")->LanguageSupportPageNames->hookPageLocalUrl($event); }); $referenzen = wire("pages")->get("/referenzen/")->localUrl($lang); $references = $referenzen->children; foreach($references as $reference) { echo "<li class='references-item'>"; echo "<p>{$reference->title}</p>"; echo "</li>"; } Any idea what I made wrong? Cheers, Christian
  14. Yes, of course it is not allowed. When you use a "+" in the title, it is replaced by a "-" in the page name, e.g: Page title: test 123+456 Page name: test-123-456 I would like to have the "+" replaced by something else, so I have added this in the module settings: +=plus In the same way I have changed the german umlauts: ä=ae ü=ue ß=sz The Umlauts work fine, but to replace the "+" does not work.
  15. In my case the problem went away by upgrading from 2.3 to 2.4
  16. Hi there, I tried to enter a replacement for the character "+" in the module settings of InputfieldPageName, but this does not work. Did I make something wrong or does anything speak against replacing the "+" character? Cheers, Christian
  17. Any news about this issue? Guess I just stumbled over this problem, because FieltypeFloat worked fine in one installation and now it cuts everything after the decimal.
  18. Hello there, can it be that in the newer PW versions there is something like a session controlled time limit to avoid logins from different IP adresses? I suddenly have some trouble with logging in with the same user name from two different locations - never had that problem before... Cheers, Christian
  19. Puhh - maybe not the nicest solution, but it works: jQuery(document).ready(function() { if($('input[name=produkt_marke]').val() == '') { $('#title').empty(); $('#title').append('Neues Produkt'); } $unfiltered = ''; $filtered = ''; $("#Inputfield_produkt_marke").keyup(function() { $unfiltered = $('input[name=produkt_marke]').val() + " " + $('input[name=produkt_art]').val() + " " + $('input[name=produkt_typ]').val(); $filtered = $unfiltered.toLowerCase().replace(/[\*\^\'\!\,]/g, '').replace(/[\.]/g, '-').split(' ').join('-'); $('input[name=title]').val($unfiltered); $('input[name=_pw_page_name]').val($filtered); $('#title').text($unfiltered); $('#Inputfield_name_path').find('strong').text($filtered); }); $("#Inputfield_produkt_art").keyup(function() { $unfiltered = $('input[name=produkt_marke]').val() + " " + $('input[name=produkt_art]').val() + " " + $('input[name=produkt_typ]').val(); $filtered = $unfiltered.toLowerCase().replace(/[\*\^\'\!\,]/g, '').replace(/[\.]/g, '-').split(' ').join('-'); $('input[name=title]').val($unfiltered); $('input[name=_pw_page_name]').val($filtered); $('#title').text($unfiltered); $('#Inputfield_name_path').find('strong').text($filtered); }); $("#Inputfield_produkt_typ").keyup(function() { $unfiltered = $('input[name=produkt_marke]').val() + " " + $('input[name=produkt_art]').val() + " " + $('input[name=produkt_typ]').val(); $filtered = $unfiltered.toLowerCase().replace(/[\*\^\'\!\,]/g, '').replace(/[\.]/g, '-').split(' ').join('-'); $('input[name=title]').val($unfiltered); $('input[name=_pw_page_name]').val($filtered); $('#title').text($unfiltered); $('#Inputfield_name_path').find('strong').text($filtered); }); }); Title, page name and path are changed live now and so they are saved correctly after editing the page. For me it's fine now, but if somebody can tell me how it could have been solved easier and more elegant, I will be happy to learn!
  20. Hm I guess it does not have anything to do with DOM - the title field and the page name field are changed after saving the page - but I would have to find a possibility to change them before the page is saved... is this possible?
  21. Just to be sure that you know what I mean: I am adding a new page - the title is added automatically as a timestamp. I am redirected directly to the Edit page. There, I have to enter some fields which are combined to fill the title field and the page name field via jQuery. When I save the page, title and page name are correct saved, but the page is saved under the old path (with timestamp). So I have to save the page manually another time - then the path is corrected and uses the current page name. I would have to combine the values of the fields in the module file, or - what I would prefer - get the jQuery manipulated page name value and provide this to the API through the function above. If somebody could help me doing this would be fantastic...
  22. Thank you very much for your help, Soma! I am just still stuck into one problem: I cannot manage to change the path of the edited page, unless I save it twice. I am still using jQuery for that part, can it be that the API doesn't recognize the changed title and page name, because this happens in the DOM? public function addScript2(HookEvent $event) { $this->page = $this->pages->get($this->input->get->id); if ($this->page->template == produkt) { $this->config->scripts->add($this->config->urls->PopulateTitle . "populate_title2.js"); } } How could I provide the API the new value of the page name field within that function?
×
×
  • Create New...