Jump to content

Scrier

Members
  • Posts

    35
  • Joined

  • Last visited

Scrier's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Thanks alot for the help and idd it was way easier just to parse the data instead >_< some things is to easy to think of I guess
  2. Well I have some problems adding php code to be executed inside a news post. The newsposting looks like this: echo " </div> <div style=\"text-align: justify; padding-top: 1px;\"> ".$news['content']." </div> </fieldset> "; Works well and all and I can use html tags inside it to format the news. example : Netherspite<A HREF=/images/Kills/Karazhan/netherspite.jpg TARGET="_blank"><IMG SRC=/images/Kills/Karazhan/netherspite2.jpg WIDTH=600 BORDER=0></A> Now what I would like to do is to add in this news executable php code.. More exactly the following thing should "echo" out: echo itemstats_parse("[item]Rip-Flayer Leggings[/item]"); (that is how to execute it in php but to make it work inside the newspost I am not really sure. Have tried some various things but I seems to do something wrong.) itemstats_parse("[item]Rip-Flayer Leggings[/item]");"itemstats_parse("[item]Rip-Flayer Leggings[/item]")"".itemstats_parse("[item]Rip-Flayer Leggings[/item]")."<? echo itemstats_parse("[item]Rip-Flayer Leggings[/item]"); ?>"<? echo itemstats_parse("[item]Rip-Flayer Leggings[/item]"); ?>" in the newspost adds the following results: itemstats_parse("[item]Rip-Flayer Leggings[/item]");"itemstats_parse("[item]Rip-Flayer Leggings[/item]")"".itemstats_parse("[item]Rip-Flayer Leggings[/item]").""" Just ask me if you need anymore feedback I think im just doing some silly mistake somewhere, but just can't figure it out where.
  3. Tried stripping away all "unceccecary" things (prolly stripped something I shouldn't) and got this: <html><body> <a onmouseover="return escape('will be 30 minutes late or so.');"><img src="images/note.gif" border="0"></a><script language="JavaScript" type="text/javascript" src="wz_tooltip.js"></script></body></html> Now this works on the old site but not the new site. explain this to me please old sitenew site
  4. Can post the generated code from the writeouts if it helps.This is the old site: <tr valign=top> <td bgcolor=#FFFFFF> <a onmouseover="return escape('<div class=\'wowitem wowitemlive\'><span class=\'iname\'><span class=\'purplename\'>Handwraps of Flowing Thought</span></span><br />Binds when picked up<br />Hands<span class=\'wowrttxt\'>Cloth</span><br />106 Armor<br />+19 Stamina<br />+19 Intellect<br /><img class=\'esock\' src=\'/images/yellowsocket.png\' alt=\'yellow\' /> Yellow Socket<br /><img class=\'esock\' src=\'/images/bluesocket.png\' alt=\'blue\' /> Blue Socket<br /><span class=\'greyname\'>Socket Bonus: +3 Spell Hit Rating</span><br />Requires Level 70<br /><span class=\'itemeffectlink\'>Equip: <a href=\'http://wow.allakhazam.com/db/spell.html?wspell=17367\' class=\'itemeffectlink\'>Increases damage and healing done by magical spells and effects by up to 32.</a> </span><br /><span class=\'itemeffectlink\'>Equip: Improves spell hit rating by 12.</span><br /><br/><span class=\'akznotice\'> </span></div>')" href=item.php?itemid=848&type=99>Handwraps of Flowing Thought</a> </td></tr> And the new site: <tr valign=top> <td bgcolor=#FFFFFF> <a onmouseover="return escape('<div class=\'wowitem wowitemlive\'><span class=\'iname\'><span class=\'purplename\'>Handwraps of Flowing Thought</span></span><br />Binds when picked up<br />Hands<span class=\'wowrttxt\'>Cloth</span><br />106 Armor<br />+19 Stamina<br />+19 Intellect<br /><img class=\'esock\' src=\'/images/yellowsocket.png\' alt=\'yellow\' /> Yellow Socket<br /><img class=\'esock\' src=\'/images/bluesocket.png\' alt=\'blue\' /> Blue Socket<br /><span class=\'greyname\'>Socket Bonus: +3 Spell Hit Rating</span><br />Requires Level 70<br /><span class=\'itemeffectlink\'>Equip: <a href=\'http://wow.allakhazam.com/db/spell.html?wspell=17367\' class=\'itemeffectlink\'>Increases damage and healing done by magical spells and effects by up to 32.</a> </span><br /><span class=\'itemeffectlink\'>Equip: Improves spell hit rating by 12.</span><br /><br/><span class=\'akznotice\'> </span></div>')" href=item.php?itemid=2&type=40>Handwraps of Flowing Thought</a> </td></tr> I can't find anything diffing them tbh but saving the files as htm I get various results on the new site but it works to put up the old site as htm and run it. So the return escape function works but for some reason the generated code (which is identical imo) won't work.
  5. Well I've moved a site to a new host that is supposedly more stable than the last one we had, Although on the new site a return escape function has stopped working, think it's part of a wz_tooltip and I'm wondering why. I am guessing that some setting or something on the host is not up to date for some reason. The following example: <a onmouseover="return escape('This is a test')"><h1>ITEMS</h1></a><br> Does not give a mouseover at all and i'm wondering if anyone knows what might be wrong. Any help appreciated. (Note the code works on the old host but not the new)
  6. Scrier

    problems with date.

    $timebeforelastsignup=1800; $time = $raid['date'] - date("U") - $timebeforelastsignup; if($time > 0 || !$raid['timed']) { echo " <h3>Add a note</h3> <br>Time until last signup: ".date('H:i:s',$time)."<br> That's how it is now. no idea why it's not working with the hours.
  7. Scrier

    problems with date.

    Well its an event people sign up for in the future and they need to sign up 30 minutes before the events starts. Still got problem with it adding an hour though.
  8. Scrier

    problems with date.

    Yep I got tags and its a .php It shows correct time (except the adding of an hour all over.)
  9. Scrier

    problems with date.

    I am trying to show a time left until a certain event. I am calculating the even with date("U") and get it in a correct amount of seconds. Now the problem i'm having is when writing it out on the following format. <br><center>Time until last signup: ".date('H:i:s',$time)."</center><br> No matter what time it is it always shows 1 hour left, even when the $time variable is < 3600 like 60 for example I get 01:01:00,Is there something I am doing wrong in the formatting?
  10. Well, i'm looking for some free code for a news posting system. Preferrable easy to add "plugins" to such as calendar and similar things. Any recommendations? Base idea I have is a calendar system that shows news from different users each day to different users. It might display to a group of people, it might display to the individual. Just something easy to get me started and if there is one connected to a calendar in some way already that you can develop further it would be ideal.
  11. No it is not in the url but in the form. $getitemquery=mysql_query("SELECT * FROM tradeitems WHERE itemid='".$_GET['itemid']."'"); $getitem=mysql_fetch_array($getitemquery); ... <td><input type=text name=itemname size=60 value=".$getitem['itemname']."></td> </tr> There is an example where it should say Lady Elizabeth... but it shops down the string to only the first word if I have spaces.nm.. I found out what it was. I forgot to put the string inside '' like this <td><input type=text name=itemname size=60 value='".$getitem['itemname']."'></td>
  12. I have a problem with the following code: $getitemquery=mysql_query("SELECT * FROM tradeitems WHERE itemid='".$_GET['itemid']."'"); $getitem=mysql_fetch_array($getitemquery); echo " <div class=\"header\"> <h1>EDIT AN TRADEITEM</h1> "; echo " <form name=additem method=post action=addtradeitem.php?action=edit&itemid=".$_GET['itemid']."> <table border=0> <tr> <td width=150>Item name:</td> <td><input type=text name=itemname size=60 value=".$getitem['itemname']."></td> </tr> that if the name contains a space character (" "), it only shows the first part of the name, like George Bush only displays as George. I guess I need to replace space with some symbol but well, i'm kinda limited in my knowledge of html and why the value is not showing correctly.
  13. Hmm Ill post all code that affects the 2 cases and see if someone can see what might be wrong. dim arrItems(), arrEleItems() elseif request.form("nirselection") = "ele" then ...(generating of the sqlquery) set SQLele = anslut.execute("" & SQLQuery & "") ArrEleIndex = 0 if SQLele.eof then ErrorCode = 2 else do while not SQLele.eof ReDim Preserve arrEleItems(5, ArrEleIndex) arrEleItems(0, ArrEleIndex) = SQLele("reqpro_ref") arrEleItems(1, ArrEleIndex) = SQLele("title") set SQLBuildName = anslut.execute("SELECT prod_ver FROM builds INNER JOIN nir_in_builds ON nir_in_builds.build_id = builds.build_id WHERE nir_element_id='" & SQLele("id") & "'") if not SQLBuildName.eof then strBuild = SQLBuildName("prod_ver") SQLBuildName.movenext do while not SQLBuildName.eof strBuild = strBuild & ", " & SQLBuildName("prod_ver") SQLBuildName.movenext LOOP else strBuild = "-" end if arrEleItems(2, ArrEleIndex) = strBuild set SQLInfoclassName = anslut.execute("SELECT type_name FROM nir_infoclass WHERE id='" & SQLele("infoclass_id") & "'") if not SQLInfoclassName.eof then arrEleItems(3, ArrEleIndex) = SQLInfoclassName("type_name") else arrEleItems(3, ArrEleIndex) = "-" end if if not SQLele("changed_by") = "" then arrEleItems(4, ArrEleIndex) = SQLele("changed_by") else arrEleItems(4, ArrEleIndex) = SQLele("created_by") end if arrEleItems(5, ArrEleIndex) = "<a href=NIR_element.asp?selection=edit&id=" & SQLele("id") & " target=_blank><img src=bilder/edit.gif border=0></a><a href=NIR_element.asp?selection=delete&id=" & SQLele("id") & " target=_blank><img src=bilder/delete.gif border=0></a>" ArrEleIndex = ArrEleIndex + 1 SQLele.movenext LOOP end if end if ...(some things that don't affect the code) for i = 0 to ubound(arrEleItems,2) ... (printing it out to page etc no errors here) next This part works flawless. elseif request.form("nirselection") = "not" then ...(making of sqlquery) set SQLnot = anslut.execute("" & SQLQuery & "") ArrIndex = 0 if SQLnot.eof then ErrorCode = 2 else do while not SQLnot.eof ReDim Preserve arrItems(4, ArrIndex) arrItems(0, ArrIndex) = SQLnot("tag") set SQLBuildName = anslut.execute("SELECT prod_ver FROM builds where build_id='" & SQLnot("build_id") & "'") arrItems(1, ArrIndex) = SQLnot("name") arrItems(2, ArrIndex) = SQLBuildName("prod_ver") if not request.form("infoclass") = "dog_aae" then arrItems(3, ArrIndex) = SQLnot("valid_for") else arrItems(3, ArrIndex) = "-" end if arrItems(4, ArrIndex) = "<a href=NIR_element.asp?selection=new&reqpro_ref=" & SQLnot("tag") & "&infoclass=" & request.form("infoclass") & "&title=" & SQLnot("name") & "&user=" & inloggad & " target=_blank><img src=bilder/new.gif border=0></a>" ArrIndex = ArrIndex + 1 SQLnot.movenext LOOP end if end if ...(some general info not intresting to the cause) for i = 0 to ubound(arrItems,2) <- HERE be tha error >_< ...(writing out items from the array) next This part worked flawless before I added the code above and now gives me a error and line 606 is the for i = 0 to ubound(arrItems,2)I had arrItems for both in the start and then the top one worked then I added one for each but still gives ubound or lbound error.
  14. Ok I totally separated the 2 now so the problem seems to be arritems alone and that I get out of bound for any lbound or ubound function towards it. Even though it says true on a Isarray. I am all out of ideas now because this code worked before I added the second picec of code and now it just decides not to work as an array anymore...
  15. Problem is that it's a search function from different tables in a database and depending on where you search a different number of items should be shown (hence 5 or 4 in size and increasing on the dimension for each hit).
×
×
  • Create New...