<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/3595" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2003-02-05T18:20:06-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/3595</id>

		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2003-02-05T18:20:06-04:00</updated>

		<published>2003-02-05T18:20:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16228#p16228</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16228#p16228"/>
		<title type="html"><![CDATA[Generate a template file for php / html output]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16228#p16228"><![CDATA[
well if you put the whole template into $code then it will replace the first occuranse of "&lt;mybotnick&gt;", if it is more than one place in the template you could use <em class="text-italics">regsub -all "&lt;mybotnick&gt;" $code "$botnick" newcode</em><br>$newcode will then hold the updated template<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Wed Feb 05, 2003 6:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[GodOfSuicide]]></name></author>
		<updated>2003-02-05T14:18:20-04:00</updated>

		<published>2003-02-05T14:18:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16218#p16218</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16218#p16218"/>
		<title type="html"><![CDATA[Generate a template file for php / html output]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16218#p16218"><![CDATA[
<blockquote class="uncited"><div><div class="codebox"><p>Code: </p><pre><code>set code "put your code in here"set code [lreplace [split $code] [lsearch [split $code] "&lt;mybotnick&gt;"] [lsearch [split $code] "&lt;mybotnick&gt;"] $botnick]puts somefile $code</code></pre></div></div></blockquote>this is how to replace it in one line..<br>but if the template is longer i would have to check it line by line, and that one i didn't get...it must be something with while not eof $file ...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1433">GodOfSuicide</a> — Wed Feb 05, 2003 2:18 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[egghead]]></name></author>
		<updated>2003-02-05T11:41:44-04:00</updated>

		<published>2003-02-05T11:41:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16215#p16215</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16215#p16215"/>
		<title type="html"><![CDATA[Generate a template file for php / html output]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16215#p16215"><![CDATA[
<blockquote class="uncited"><div>and how would you do the replacements wcc ?</div></blockquote>There are many ways to do it. One way to do it is make a file with on each line the keyword (i.e. the name of the variable) and its value. Every ten minutes or so you read in the file, get the variable name (the keyword) from each line, and then write back the keyword and its up-to-date value back to file.<br><br>Btw, it is a good idea to put all variables you want to display under good scrutiny. Many people have variables which contain passwords etc. for use in scripts. Showing *all* the variables will reveal those passwords.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=282">egghead</a> — Wed Feb 05, 2003 11:41 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2003-02-05T11:29:09-04:00</updated>

		<published>2003-02-05T11:29:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16211#p16211</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16211#p16211"/>
		<title type="html"><![CDATA[Generate a template file for php / html output]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16211#p16211"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set code "put your code in here"set code [lreplace [split $code] [lsearch [split $code] "&lt;mybotnick&gt;"] [lsearch [split $code] "&lt;mybotnick&gt;"] $botnick]puts somefile $code</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Wed Feb 05, 2003 11:29 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[GodOfSuicide]]></name></author>
		<updated>2003-02-05T09:56:25-04:00</updated>

		<published>2003-02-05T09:56:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16198#p16198</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16198#p16198"/>
		<title type="html"><![CDATA[Generate a template file for php / html output]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16198#p16198"><![CDATA[
and how would you do the replacements wcc ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1433">GodOfSuicide</a> — Wed Feb 05, 2003 9:56 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Wcc]]></name></author>
		<updated>2003-02-04T18:47:01-04:00</updated>

		<published>2003-02-04T18:47:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16171#p16171</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16171#p16171"/>
		<title type="html"><![CDATA[Generate a template file for php / html output]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16171#p16171"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>file copy -force &lt;old file&gt; &lt;new file&gt;</code></pre></div>Wcc<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=270">Wcc</a> — Tue Feb 04, 2003 6:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[GodOfSuicide]]></name></author>
		<updated>2003-02-04T15:18:52-04:00</updated>

		<published>2003-02-04T15:18:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16166#p16166</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16166#p16166"/>
		<title type="html"><![CDATA[Generate a template file for php / html output]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16166#p16166"><![CDATA[
Ok, the template is for a static web page..<br><div class="codebox"><p>Code: </p><pre><code>Bot's nick : &lt;mybotnick&gt;</code></pre></div>would be a posibility for example. i used "exec cp $startfile $targetfile", i dont know the TCL commands for copying files.<br><br>the targetfile would be for example "output.txt", and in there the &lt;botnick&gt; from the template should have been replaced by $botnick variable.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1433">GodOfSuicide</a> — Tue Feb 04, 2003 3:18 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2003-02-04T14:53:47-04:00</updated>

		<published>2003-02-04T14:53:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16164#p16164</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16164#p16164"/>
		<title type="html"><![CDATA[Generate a template file for php / html output]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16164#p16164"><![CDATA[
I don't get it heh. What kind of template are you talking about? Why do you have to use exec? All you're doing is copying the file, use tcl's "file copy" command. Or why don't you have eggdrop create a file with the variables in it, like one per line, and then read it in php?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Tue Feb 04, 2003 2:53 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[GodOfSuicide]]></name></author>
		<updated>2003-02-04T14:35:02-04:00</updated>

		<published>2003-02-04T14:35:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16161#p16161</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16161#p16161"/>
		<title type="html"><![CDATA[Generate a template file for php / html output]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16161#p16161"><![CDATA[
that i had to use "exec" -&gt; bot is blocked, that i got to use regsub for each var, etc...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1433">GodOfSuicide</a> — Tue Feb 04, 2003 2:35 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2003-02-04T14:32:34-04:00</updated>

		<published>2003-02-04T14:32:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16160#p16160</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16160#p16160"/>
		<title type="html"><![CDATA[Generate a template file for php / html output]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16160#p16160"><![CDATA[
You could... write a script for eggdrop that listens for requests for the value of the given variable, and then in php use the socket functions to connect to your script and query whatever values you want and set them as php vars.<br><br>But what's wrong with the way you're doing it now?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Tue Feb 04, 2003 2:32 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[GodOfSuicide]]></name></author>
		<updated>2003-02-04T14:29:51-04:00</updated>

		<published>2003-02-04T14:29:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16158#p16158</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16158#p16158"/>
		<title type="html"><![CDATA[Generate a template file for php / html output]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16158#p16158"><![CDATA[
I'm currently trying to publish some of my bot's global var's to a php / html page on my shell, but i dont know how to replace the strings in there.<br><br>i tried to copy the template -&gt; output file, open it, replace the vars and close it again, but this way kinda suxx.<br><br>does anybody know how it would be easy and fast to generate template files for html output ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1433">GodOfSuicide</a> — Tue Feb 04, 2003 2:29 pm</p><hr />
]]></content>
	</entry>
	</feed>
