Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - uksoreeyes

Pages: 1 [2]
16
Installation, Update & Configuration / user_online_list
« on: March 27, 2003, 11:13:53 PM »
Hi, is there any way I get get the user online list to display the results under eachother eg:

user_1
user_2
user_3
user_4

rather than beside eachother like this:

user_1, user_2, user_3, user_4

Thanks in advance

Carl

17
Installation, Update & Configuration / loggedin_user_name
« on: March 24, 2003, 03:13:42 AM »
Hi I am currently intergrating 4images with a shoutbox I coded. The shoutbox uses php and mysql.

As a way to stop just anyone posting in my shoutbox I made it so users had to register with 4images before they could post anything. In other words I have made use of the {if user_loggedin} etc so is the user is not logged in they get a message telling them to login. If they are logged in they are presented with the form in which they can freely post messages.

I have this working great, they do not have to put in their name as what ever name they are logged in as, appears above their messages which makes it easy to track and ban troublemakers.

The bit I am haveing trouble with is inserting the logged_in_username into my mysql database. at the moment I have a hidden form field:

Code: [Select]
<input type='hidden' name='name' class="news" size='20' value='{loggedin_user_name}'>

This works fine and inserts the username correctly. But I find it a bit of a security risk as someone could easily 'view source' edit and change the name inside the 'value' bit. what I would like to do is get rid of that hidden field and have the username taken from the 4images database.

Here is my shoutbox code:



Code: [Select]
<?php
if &#40;$shout&#41;&#123; 
if &#40;$name == !"" && $message == !""&#41;&#123;
$ip $REMOTE_ADDR;
$info $HTTP_USER_AGENT;
$add_date=time &#40;void&#41;;
$name stripslashes&#40;$name&#41;;
$name htmlspecialchars&#40;$name&#41;;
$message stripslashes&#40;$message&#41;;
$message htmlspecialchars&#40;$message&#41;;
mysql_connect&#40;"username etc"&#41;; 
mysql_select_db&#40;"shout"&#41;; 
$result=MYSQL_QUERY&#40;"INSERT INTO shouts &#40;id,name,message,timestamp,ip,browser,block&#41;".
"VALUES &#40;'NULL', '$name', '$message', '$add_date', '$ip', '$info', '$block'&#41;"&#41;;  
echo "<META http-equiv='refresh' content='0;URL=/4images/index.php?template=shout'>"
&
#125;
else &#123;
echo "<META http-equiv='refresh' content='0;URL=/4images/index.php?template=shout'>"
&
#125;
&#125;
?>


as you see the $name bit relates to that hidden form field I showed you earliar. Is there any way I can replace that $name bit with the actual logged in username data taken straight from mysql? my shoutbox resides on the same mysql tabe as 4images does so there is no need to connect twice.

Please help me here as I am very stuck and this will finish my site off nicely. I am not very good at explaining things so if theres something you don't understand, just ask me and I'll tell you.

Thanks in advance

Carl

18
Installation, Update & Configuration / Thumbnails and css
« on: March 18, 2003, 07:13:54 PM »
Hi I've been trying to add a style to my thumbnails but don't know where to start.

basically what I want to do is this:

Code: [Select]
<a href="image url etc" class="image"><img src...

but where abouts in the script to I find the <a href> bit to add the class="image" bit?

19
Mods & Plugins (Requests & Discussions) / phpbb v2.02
« on: March 10, 2003, 09:00:06 PM »
Hi could anyone tell me where I can get a copy of phpbb version 2.02 as 4images doesn't work with the current version 2.04?

Looked on the phpbb website and can't find it.

Help would be appreciated

Thanks in advance

Carl

20
Installation, Update & Configuration / change template
« on: March 04, 2003, 02:54:08 AM »
hello, lets say I make a page called smile.html and I put this in my /templates/default folder. To access the page I type www.mydomain.com/4images/index.php?template=smile right?

Is is possibe to change the template bit to say something like page

so I can access all my pages via www.mydomain.com/4images/index.php?page=smile

21
Installation, Update & Configuration / php in templates
« on: March 02, 2003, 06:58:44 PM »
I was wondering if its possible to execute php within a template.

I have created a page called shout.html which works great when I access it via /index.php?template=shout

What I want to do is have a snip of php in this template:

Quote
<?PHP include("shout_sql.php"); ?>


this would display the contents of my database on this page but it doesnt work how can I do this?

Thanks in advance

Carl B

22
Mods & Plugins (Requests & Discussions) / Thumbnail creation
« on: October 11, 2002, 04:27:59 AM »
Hi, is it possible for the script to auto create thumbnails for outside linked pictures.

for example: a user wants to add a picture, but instead of uploading, he/she links an image file from another server by adding the relevent info into the URL field. when he/she clicks submit, I would like the script to create the thumbnail for that image instead of displaying the default jpg icon.

can this be done? would be a great feature.

Regards Carl - http://www.uksoreeyes.co.uk

23
Installation, Update & Configuration / user_logininfo.html
« on: October 04, 2002, 03:40:57 AM »
Hi, I've had this script about a week now and I love it to bits. I am currently coding my new template which is very cool and is taking a long time.

I have a problem though. On the user_logininfo.html page theres the bit which says
Code: [Select]
{lang_loggedin_msg} Now we all know that this is the bit thats prints
Quote
Logged in as: YOURNAME
What I want to do is this:
Code: [Select]
<FONT class=recent>Logged in As:</FONT><BR>
<FONT class=normal>YOURNAME</FONT>
In the bit which reads "YOURNAME" I would like the name of the user currently logged in. Just like the original would say. Now I've tried putting {user_name} in the YOURNAME bit, but it doesnt work as I get a different name on every page. It only seems to display the correct name on the control panel page.

Can anyone help me with this? what bit of code do I need? it's had me confused for hours and hours.

Thanks in advance,
Carl - http://www.uksoreeyes.co.uk/home/index.php

Pages: 1 [2]