Hello, I have been working on a template project for a couple weeks now, datingchat.gr a greek website, and I am attempting to add buttons on the front page that are displayed within a table that references user information. There is another page within the website that already has the functions I am looking for, but I want to expand those functions to the front page. The problem I am running into is that when one user is trying to send another user a message I get an error DB Error: constraint violationDB_Error Object, this is caused because the userid of the receiving user isn't present on the front page. My question is how do I use HTML to grab that information? Do I grab it from the database? If so how do I direct the query to the correct user if the userid is not there? Or do I use the other page that already has the functionality on it? From what I have been able to find, this functionality is within the PHP code, and I cannot bring that over into the HTML page. If there are any questions that you need to ask to help you understand this please do ask them, I know I am probably not very good at explaining the problem. Thank you very much for your time, I look forward to any help I can get! -Alex
I don't think I explained myself well enough. Let me add to the explanation. Ok so on Datingchat.gr when you view a person's profile, on the top of the page you have actions you can perform; send message, wink, add to buddylist, etc. All of these actions are already implemented. If you go to Match.com you will see what I am trying to accomplish on the front page, when you search for a match on match.com it shows up with pages of people who match your criteria, and next to their little picture, there are 3 buttons, email, wink, and add to favorites. Well on my front page, it shows new users, and it also has those three functions with little picture buttons. Well my problem is that I need those three buttons to carry out the same function as the view profile page, but when I try to send a message, wink, etc. the website does not find the receiver's userid. I have looked through the code, and I am stumped as to how I would accomplish this. The files I am working with are .php, .tpl, and .css. I have been sort of thrown into an uncomfortable programming job, and do not have the amount of knowledge I would like. So when I was looking through the code it seems that the page that has the function that pulls the userid from the database, and fills a variable on the web page is in a .php file, but where the .tpl file displays the information, and I am honestly very confused as to how these files interact, and how I can make other pages use the .php files to carry out the proper functions. Here is the code for the buttons and the function for viewing the person's profile which is right next to it, which works. I assumed that copying it would allow the other functions to pull the same information but, unfortunately I'm wrong apparently. <td colspan="2" align="center" height="20" class="statusbar"> {if $config.enable_mod_rewrite == 'Y'} <a href="javascript:popUpScrollWindow2('{$docroot}{$item.id}.htm','center',650,600)">{lang mkey='view_profile'}</a> {else} <a href="javascript:popUpScrollWindow2('{$docroot}showprofile.php?id={$item.id}','center',650,600)">{lang mkey='view_profile'}</a> {/if} {if $smarty.session.security.message == 1 && $item.id != $smarty.session.UserId && $smarty.session.UserId != '' } <a href="javascript:popUpScrollWindow2('{$docroot}compose.php?id={$item.id}')"><img src="/v1/icons/icon_email.gif" alt="" /></a> <a href="javascript:popUpScrollWindow2('{$docroot}sendwinks.php?id={$item.id}')"><img src="/v1/icons/icon_wink.gif" alt="" /></a> <a href="javascript:popUpScrollWindow2('{$docroot}buddybanlist.php?id={$item.id}')"><img src="/v1/icons/icon_add_favs.png" alt="" /></a> {/if} </td> Code (markup): One problem with the project i am having that I think is causing a lot of my problems is there are references to files like this : {include file="nickpage_logo.tpl"} {include file="nickpage_navi.tpl"} but I cannot find where the are physically stored, so I cannot get to them to edit them, or manipulate them in any way. Has anyone had experience with using bought template websites that has mysteriously hidden files? If so where did you find them? I have looked through every folder in the entire project, but these pages are referenced and have to be used so they must be stored somewhere right? Or am I crazy? Thank you so much for your help! -Alex