Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Doppeltes tempalte fetchen verhindern...
Goto page Previous  1, 2
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: German
View previous topic :: View next topic  
Author Message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Wed Sep 11, 2013 8:46 pm    Post subject: Reply with quote

auf welchem Wege gelangt der Wert von getGC() in das anzeigende Template?
Back to top
View user's profile Send private message
Paykoman
Smarty Rookie


Joined: 07 May 2011
Posts: 34

PostPosted: Wed Sep 11, 2013 8:47 pm    Post subject: Reply with quote

da ändert sich nichts.

Naja das ist nen Langer und recht unübersichtlciher weg...

Bin gerade mal dabei den Fehelr zu reproduzieren in ner standard smartyinstallation allerdigns fetcht er da gerade nicht xD
Back to top
View user's profile Send private message
Paykoman
Smarty Rookie


Joined: 07 May 2011
Posts: 34

PostPosted: Wed Sep 11, 2013 8:55 pm    Post subject: Reply with quote

Hmm okay, ich kriege den Fehler in ner Blanko installation auch nciht reproduziert =(

Code:
require('libs/Smarty.class.php');

$smarty = new Smarty;

function test(){
   global $smarty;
   return $smarty->fetch('test.tpl');
}

$func = "test";


$smarty->assign("fet1",call_user_func($func),true);
$smarty->assign("fet2",call_user_func($func),true);


Im Grunde ist es genau das was mein Script auch macht Sad


::: EDIT :::
Wobei mir gerade auffällt das ik in mein script die selbe variable in smarty benutz {$captcha} vllt. beisst sich das werde ik mal testen...


Last edited by Paykoman on Wed Sep 11, 2013 8:57 pm; edited 1 time in total
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Wed Sep 11, 2013 8:56 pm    Post subject: Reply with quote

Auf jeden Fall funktioniert das fetch() einwandfrei. Da must du noch einen anderen Fehler in Deiner Logik haben......
Back to top
View user's profile Send private message
Paykoman
Smarty Rookie


Joined: 07 May 2011
Posts: 34

PostPosted: Wed Sep 11, 2013 9:00 pm    Post subject: Reply with quote

Also hier ncoh mal den quellcode von var_dump() vllt. fällt dir ja was ein weil das was in der var ist ist genau das was in der .tpl datei drin seht die smarty fetcht

Code:
1string(388) "<div class="QapTcha"></div><div class="clear"></div>
<script type="text/javascript">
  $(document).ready(function()
  {
    $('.QapTcha').QapTcha({
      autoSubmit : true,
      txtLock : 'Locked : Unlock to submit this form',
      txtUnlock : 'Unlocked : form can be submited',
      txtUnlock2 : 'Unlocked : form will auto send or click the Button when work it not'
    });
  });
</script>"
string(388) "<div class="QapTcha"></div><div class="clear"></div>
<script type="text/javascript">
  $(document).ready(function()
  {
    $('.QapTcha').QapTcha({
      autoSubmit : true,
      txtLock : 'Locked : Unlock to submit this form',
      txtUnlock : 'Unlocked : form can be submited',
      txtUnlock2 : 'Unlocked : form will auto send or click the Button when work it not'
    });
  });
</script>"


mal noch das Bild dazu:


Also wie man sieht arbeitet der hook, ja eigentlich richtig, beide Elemente sind vorhanden und beinhalten jeweils einmal die div und einmal script und doch wird es doppelt angezeigt, seltsam!


Last edited by Paykoman on Wed Sep 11, 2013 9:05 pm; edited 1 time in total
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Wed Sep 11, 2013 9:03 pm    Post subject: Reply with quote

Sonst mach mal $smarty->debugging = true

Dann siehst du die Werte der Template Variablen
Back to top
View user's profile Send private message
Paykoman
Smarty Rookie


Joined: 07 May 2011
Posts: 34

PostPosted: Wed Sep 11, 2013 9:06 pm    Post subject: Reply with quote

Okay, habs gelöst.
Und NEIN lag nciht am Hook sondern verrennt man sich mansch mal so das man das offensichtliche einfach übersieht xD

Aber trotzdem vielen vielen lieben dank, denn drauf gekommen bin ich eig. nur durch das genau angucken vom var_dump das hat einfach keinen Sinn gemacht *g*
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: German All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP