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.


Messages - uksoreeyes

Pages: 1 2 3 [4] 5 6
46
Discussion & Troubleshooting / Shoutbox help
« on: May 01, 2003, 11:06:36 AM »
Hi I added thie code below my:
require(ROOT_PATH.'includes/sessions.php');

It works and redirects but the template doesnt display the header or footer which results in a messed up page. Can you tell me why this is happening?

47
Discussion & Troubleshooting / Shoutbox help
« on: May 01, 2003, 10:32:20 AM »
Hello I was wondering if someone could help me with a little bug in my shoutbox that I intergrated into 4images. The first is actually quite simple but I can't seem to figure out the code to use.

On my gallery I have a shoutbox where the user cannot post unless he/she is logged in. I used the {if user_loggedin} to show the form if the user is logged in, if the user is a guest I used the {if user_loggedout} to show an image stating that u must be logged into post.

The problem is that sometimes a user logs out of the gallery and their browser has cached the page and the form is visible which lets the visitor post even though he/she is logged out. I want to add a bit code to the script below that will be along the lines of:

if user_level=guest or user_awaiting // popup a javascript message stating that you must be logged into post then when the user clicks ok he/she is redirected back to the page they came from. and if user_level=registered or admin //continue with the post as normal.

If anyone could help with this I would be very greatful. I wrote this little script myself and am trying to get rid of a few bugs but when I do I will post this as a mod unless someone else wants to, your free to do so. My code is below so you can see what I'm getting at.

Code: [Select]
<?php

if &#40;$shout&#41;&#123;
 
define&#40;'ROOT_PATH', './'&#41;;
include&#40;ROOT_PATH.'global.php'&#41;; 
require&#40;ROOT_PATH.'includes/sessions.php'&#41;;

if &#40;$message == !""&#41;&#123;
$ip $REMOTE_ADDR;
$info $HTTP_USER_AGENT;
$goto $HTTP_REFERER;
$add_date=time &#40;void&#41;;
$message stripslashes&#40;$message&#41;;
$message htmlspecialchars&#40;$message&#41;;
$user_name $user_info['user_name'&#93;;
$result=MYSQL_QUERY&#40;"INSERT INTO shoutbox &#40;id,name,message,timestamp,ip,browser,block&#41;".
"VALUES &#40;'NULL', '$user_name', '$message', '$add_date', '$ip', '$info', '$block'&#41;"&#41;;  
echo "<META http-equiv='refresh' content='0;URL=$goto'>"
&
#125;
else &#123;
echo "<META http-equiv='refresh' content='0;URL=http&#58;//www.myleeneklass.com'>"
&
#125;
&#125;
?>

48
Does anyone have a demo or screenshot of this mod in action? Id like to see how it is incorperated into 4images. Thank you

Carl

49
Thats perfect v@no, thank u very much  :D I wish I could do php as good as u.

50
Yeah I've seen that mod and I was thinking of adding it to my site then decided I didnt really have the space to add it, so I skipped it. Maybe in the future when I get more images in the gallery I might add that.

But the reason I want this mod that displayes all images that have had a vote, or comment, or download is because My gallery has the more statistics mod installed which displays the following:

Quote
13 Total albums
162 Total images
67 Total votes
5659  Total hits
14 Total downloads
3 Total comments


and I thought it would be nice if the 'total votes' 'total downloads' and the 'total comments' when clicked displayed the relevant information. it would also be good for me to track votes and downloads and comments without having to log into the admin section all the time.

51
No what I mean is when you click on the 'new images' link you are sent to: search.php?search_new_images=1 where all the new images of the gallery are displayed as thumbnails.

I would like a similar command available where I can add a link next to 'new images' lets say 'voted images' and when clicked you are sent to the search.php where it searches and displayes all the images in the gallery that have had a vote.

understand?  :D

52
I was wondering if its possible to have a page like the 'new images' page only that instead of displaying the new images, it will display all the images that have had a vote, or that have had a comment, or that have been downloaded, or display all images in the gallery. depending on what link the user clicks?

If you don't understand tell me and i'll try and explain a bit better

53
Mods & Plugins (Releases & Support) / [Mod] Star Rating
« on: April 24, 2003, 10:42:38 PM »
Thanks again V@no, made a slight change by adding an alt tag to show the actual rating when a user hovers over the stars. I also removed the <b></b> tags as they don't seem to be getting used. I added the star rating to top 10 images by votes

Open top.php

Top 10 images by rating with alt text.

find:
Code: [Select]
$register_array['image_rating_number_'.$i] = "<b>".$top_list[$i]['image_rating']."</b> (".$top_list[$i]['image_votes']." ".$lang['votes'].")";
replace with:
Code: [Select]
$register_array['image_rating_number_'.$i] = "<img src=\"".TEMPLATE_PATH."/images/".floor($top_list[$i]['image_rating']).".gif\" alt=\"Rating: ".$top_list[$i]['image_rating']." (".$top_list[$i]['image_votes']." ".$lang['votes'].")\"> "."(".$top_list[$i]['image_votes']." ".$lang['votes'].")";
Top 10 images by votes with alt text.

find:
Code: [Select]
$register_array['image_votes_number_'.$i] = "<b>".$top_list[$i]['image_rating']."</b> (".$top_list[$i]['image_votes']." ".$lang['votes'].")";
replace with:
Code: [Select]
$register_array['image_votes_number_'.$i] = "<img src=\"".TEMPLATE_PATH."/images/".floor($top_list[$i]['image_rating']).".gif\" alt=\"Rating: ".$top_list[$i]['image_rating']." (".$top_list[$i]['image_votes']." ".$lang['votes'].")\"> "."(".$top_list[$i]['image_votes']." ".$lang['votes'].")";
This is a great Mod if u would like to see my top images with the stars go here: http://www.myleeneklass.com/top.php

54
Mods & Plugins (Releases & Support) / [Mod] Star Rating
« on: April 24, 2003, 04:17:28 AM »
Anyway to add the star rating to the top.php? It would be nice to show the start rating in the top 10s. Ive tried everything but cant get it to work. little help?

Carl

55
Ok here is my little mod to give the thumbnails their own column in the table :)

Open admin/images.php

find:
Code: [Select]
echo "<td class=\"tableseparator\">".$lang['field_image_name']."</td>\n<td class=\"tableseparator\">".$lang['field_category']."</td>\n<td class=\"tableseparator\">".$lang['field_username']."</td>\n<td class=\"tableseparator\">".$lang['field_date']."</td>\n<td class=\"tableseparator\">".$lang['options']."</td>\n</tr>\n";
replace with:
Code: [Select]
echo "<td class=\"tableseparator\">Image thumbnail</td>\n";
echo "<td class=\"tableseparator\">".$lang['field_image_name']."</td>\n<td class=\"tableseparator\">".$lang['field_category']."</td>\n<td class=\"tableseparator\">".$lang['field_username']."</td>\n<td class=\"tableseparator\">".$lang['field_date']."</td>\n<td class=\"tableseparator\">".$lang['options']."</td>\n</tr>\n";

assuming you have followed v@nos little update along with mine above, find:
Code: [Select]
echo "<td><b><a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_row['image_id'])."\" target=_blank><img src=\"".((empty($image_row['image_thumb_file'])) ? ICON_PATH."/".get_file_extension($image_row['image_media_file']).".gif" : ((is_remote($image_row['image_thumb_file'])) ? $image_row['image_thumb_file'] : ROOT_PATH.THUMB_DIR."/".$image_row['cat_id']."/".$image_row['image_thumb_file']))."\" width=\"40\" height=\"40\" border=\"1\" alt=\"\" />&nbsp;".htmlspecialchars($image_row['image_name'])."</a></b> (".$image_row['image_media_file'];
replace with:
Code: [Select]
echo "<td align=\"center\"><a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_row['image_id'])."\" target=_blank><img src=\"".((empty($image_row['image_thumb_file'])) ? ICON_PATH."/".get_file_extension($image_row['image_media_file']).".gif" : ((is_remote($image_row['image_thumb_file'])) ? $image_row['image_thumb_file'] : ROOT_PATH.THUMB_DIR."/".$image_row['cat_id']."/".$image_row['image_thumb_file']))."\" border=\"1\" alt=\"\" /></a></td>\n";
echo "<td><b><a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_row['image_id'])."\" target=_blank>".htmlspecialchars($image_row['image_name'])."</a></b> (".$image_row['image_media_file'];

And thats it. Save your file. If you find a fault with this little add on mod feel free to tell me.

Carl

56
Hi V@no I have spotted a little mistake in the code you supplied:
Code: [Select]
<img src="".((empty($image_row['image_thumb_file'])) ? ICON_PATH."/".get_file_extension($image_row['image_media_file']).".gif" : ((is_remote($image_row['image_thumb_file'])) ? $image_row['image_thumb_file'] : ROOT_PATH.THUMB_DIR."/".$image_row['cat_id']."/".$image_row['image_thumb_file']))."\" width=\"40\" height=\"40\" border=\"1\" alt=\"\" />&nbsp;

You missed out a \ in the <img src="".((empty($im... which I think was down to this forum because I have had trouble getting the forum to display the \. Anyways the missing \ caused me to get this error:
Quote
Parse error: parse error, expecting `','' or `';'' in \htdocs\admin\images.php on line 769

So if anyone else got this error just change the above code to this:
Quote
<img src=\"".((empty($image_row['image_thumb_file'])) ? ICON_PATH."/".get_file_extension($image_row['image_media_file']).".gif" : ((is_remote($image_row['image_thumb_file'])) ? $image_row['image_thumb_file'] : ROOT_PATH.THUMB_DIR."/".$image_row['cat_id']."/".$image_row['image_thumb_file']))."\" width=\"40\" height=\"40\" border=\"1\" alt=\"\" />&nbsp;


I have also made a little mod to the way this mod is layed out, I'll post that here in a bit if anyone is interested. It just gives it a nicer ordered look :)

57
Installation, Update & Configuration / Moved servers
« on: April 19, 2003, 12:09:17 AM »
Thanks :)

58
Installation, Update & Configuration / Moved servers
« on: April 15, 2003, 07:55:08 PM »
Hi there I have just reinstalled my server to make it nice and fast again, the problem is now I am getting an error. I put everything back in the same place it was previous, the database was backed up then reinstalled and all the files seem to be in the correct place. When I connect to my main index.php I get this error.


Quote
Warning: Failed opening './includes/db_.php' for inclusion (include_path='c:\php4\pear') in d:\program files\instantservers\miniportal\apache\www\myleeneklass\htdocs\global.php on line 119

Fatal error: Cannot instantiate non-existent class: db in d:\program files\instantservers\miniportal\apache\www\myleeneklass\htdocs\global.php on line 120


What could be causing it?

Carl

59
Thanks for the help worked perfect.

60
Hi have created a template called contact.html and link to it via index.php?template=contact

Now when a user is logged in I would like his/her username and email address placed in the appropriate fields. I have got the name printed ok but the email address doesn't want to work. Here is my code.

Code: [Select]
<form method=post action="thanks.php">
<table width="300" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="108">Your Name:</td>
<td width="192">
<input type="text" name="name" value="{user_name}">
</td>
</tr>
<tr>
<td width="108">Your E-mail:</td>
<td width="192">
<input type="text" name="email" value="{user_email}">
</td>
</tr>
<tr>
<td width="108" valign="top">Your Message:</td>
<td width="192">
<textarea name="message"></textarea>
</td>
</tr>
<tr>
<td width="108">&nbsp;</td>
<td width="192">
<input type="submit" name="Submit" value="Send Form">
</td>
</tr>
</table>
</form>


As you can see I have put {user_email} in the value part of the form, but it returns nothing. Anyone know what I can do?

Carl

Pages: 1 2 3 [4] 5 6