Jump to content

LexHammer

Members
  • Posts

    34
  • Joined

  • Last visited

    Never

Everything posted by LexHammer

  1. Hello, i have this php code. Its for sms insertion of links in to table <table border="1"> <?PHP $db_user = 'user'; $db_pass = 'pass'; $db_name = 'name'; $db_host = 'localhost'; if(mysql_connect($db_host,$db_user,$db_pass)) { mysql_select_db($db_name); mysql_query("CREATE TABLE IF NOT EXISTS smsads(id bigint unsigned primary key auto_increment, link varchar(255), fromnum varchar(60))"); $res = mysql_query("SELECT * FROM smsads ORDER BY id DESC LIMIT 10"); while($row = mysql_fetch_object($res)) { $http_link = $row->link; if(strstr($http_link, 'http') === FALSE) $http_link = 'http://'.$http_link; echo "<tr><td><a href=\"{$http_link}\" target=\"_blank\">{$row->link}</a></td></tr>"; } } ?> </table> The problem is that i use tpl files for the visual part and all my other tables are in tpl. How can i insert the table above in my tpl file, whitout loosing its functions?
  2. Thank you all. This is what i needed!
  3. Hello, is there a way to move one object left to right or right to left without writing 10000 times Thank you
  4. Hello, I want to make a list with 2 columns on one of my pages with link to categories on my page. But they appear in only one column (on below the other) and i want them to be like: Pictures Videos Pictures2 Videos2 These are my codes <li> <a href="user_album_add.php">Pictures</a> <li> <a href="user_album2_add.php">Pictures2</a> <li> <a href="user_video_add.php">Video</a> <li> <a href="user_video2_add.php">Video2</a> What should i do? Thank you!
  5. I dont understand you. I dont have table style. Where should i put it? And where should i put "for <TD> tags put <td align="center">"
  6. I want to make a table with bigger text font and i want the text in each cell to be centered, not aligned to right. What is the code for that? The table code {include file='header.tpl'} <center><table border="1"> <tr> <td></td> <td><b>Text1<b></td> <td><b><FONT COLOR="red">Text2</font></b></td> </tr> <tr> <td>TEST1</td> <td>TEST2</td> <td>TEST3</td> </tr> </table></center></font> {include file='footer.tpl'}
  7. Not working... nothing happens. I found this code in the login, which i have forgoten that is threre, which is for a "getting started" wizard, that guides you only the first time when you login to the page. This is the code // CHECK FOR REDIRECTION URL if(isset($_POST['return_url'])) { $return_url = $_POST['return_url']; } elseif(isset($_GET['return_url'])) { $return_url = $_GET['return_url']; } else { $return_url = ""; } $return_url = urldecode($return_url); $return_url = str_replace("&", "&", $return_url); if($return_url == "") { $return_url = "user_home_started.php"; } Can this be modified to work with the chat, but to apply every time on login, not just the first time?
  8. Yes, i use sessions. But which page is "the other page" ? The code i gave is from login.php. The page that is is opened after login is user_home.php Which code should go where? I guess the code in login.php should looks like // USER IS LOGGED IN, FORWARD TO USER HOME if( $user->user_exists ) { header("Location: user_home.php"); if ($_SESSION['newLogin']==1) { $_SESSION['newLogin']=0; header("javascript:launchChat();"); } exit(); } Am i wrong?
  9. On my page, when a user login he's redirects to user_home.php. I made it also to open the chat screen when the user login. This is the code: // USER IS LOGGED IN, FORWARD TO USER HOME if( $user->user_exists ) { header("Location: user_home.php"); header("javascript:launchChat();"); exit(); } The problem is that every time, the user open user_home.php, the chat screen reloads (the user is loged out and loged in to the chat). How to make the chat screen loads ONLY THE FIRST time, when the user login?
  10. That didnt worked. <body onload="chat();">, but that worked <body onload="javascript:launchChat();">. I also changed the page from user_home.php to login.php and the code is this: // USER IS LOGGED IN, FORWARD TO USER HOME if( $user->user_exists ) { header("Location: user_home.php"); header("javascript:launchChat();"); exit(); } The problem is that every time the user_home page is opened, the chat reloads. How to make it load only for the first time the user log in and not every time when he opens user_home.php?
  11. I have a chat, which i want to be opened, as soon as the users login to the site. As it is now, when the user login, he's redirected to home.php and have to press the CHAT button to enter the chat The code for the chat button is <a href="javascript:launchChat();" class='top_menu_item' style="text-decoration:none">CHAT</a> Thank you.
  12. No, no i dont want to link to facebook. I just want it for my site. Can somebody do it? I know its not hard, i just dont know how to make the username appear.
  13. What is the code to make an option like the relationship status in facebook. Explanation: you have a filed, where you enter other user's username and it appears on your profile like a link and can be clicked on it so you can see the other user's profile
  14. I made it with a table... With border 0 its exactly what i wanted. If you or anybody else cant come up with something else, the table is ok for me...
  15. I dont know what else to show you... this is all i got. The div was because of an option that can have text comment for the ad, but no need of that. Here is the row code without the div. <a href='[userprofile]'> <img src=[userphoto] width=[userphotowidth] border=0> </a> That will display the user's photo on the top of the page and when somebody click on it, he will be redirected to the profile. I think that making the pictures in a table with 10 pictures/row will be good if there is no other way now...
  16. This is the code... No other code. Just the $ads->ads_display('1') or 2-3-4 and the code for the ads_display... Isnt there any other way to make them appear in row...
  17. I removed the div and still no change... Just a little change in the possition of the upper add.
  18. I used your code, but no change at all, they are still in a column Just to tell you, that i have very low php skills so dont ask me to do anything:) I just can copy paste the code you give me and adjust it with my content... What about if the ads_display codes are inserted itno in a table?
  19. This is the code for the ads_display. Its jut showing small picture with redirect url <div> <div Xstyle='float:left'> <a href='http://www.****.com/***/'> <img src=http://www.****.com/./uploads_user/1000/2/0_4230.jpg width=50 border=0> </a> </div> <div></div> </div>
  20. Yes, SMARTY. With that code, they are displayed in a column. I dont want that! I need them to be displayed in a row.
  21. Sorry guys, but i forgot to say that its for tpl file, not for php... What will be the code for tpl?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.