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
1
Installation, Update & Configuration / Call up data from settings
« on: June 28, 2003, 11:13:24 PM »
Hi I am adding a new feature to my page_header.php and I was wondering if anyone could help.

I need to call some data from the 4images_settings table and I was wondering how to do it.

I know that if I need to call data from the 4images_users I just do the following:
Code: [Select]
$user_info['user_name'];
but I'm stuck on settings. should it be something like this:
Code: [Select]
$setting_item['required_data'];
Thanks in advance

Carl

2
Templates & Styles (Requests & Discussions) / My site
« on: June 19, 2003, 04:57:11 AM »
Just thought I would show off my site for those people who havn't seen it.

I used photoshop 7.0 to create the graphics and dreamweaver MX to put the code together in the templates. I made a lot of changes to the 4images script to get various things working.

The site took me a good 3 months to put together, the shoutbox taking up most of that time as my previous shoutbox stored the shouts in a .txt file. So when I built my new MYSQL shoutbox I had to transfer all 3000 messages over which took ages.

Anyway, thats about it, I hope you like it. I sadly won't be putting my design up for download because I worked so hard on it, and most of the features won't work with the basic 4images instalation. But if I ever get some free time I will create a new template for 4images.

My site is http://www.myleeneklass.com

Carl

3
Ok Made a mod for the Admin CP which I spend most of my days trying to figure out what I can add to make my life that little bit easier.

I thought it would be a nice idea to have the date and time displayed. Also by moving a few links around seemed to make things more accessible.
--------------------
Open admin/index.php
Remember to back up this file before you edit it

Find:
Code: [Select]
<b><a href="<?php echo $site_sess->url(ROOT_PATH); ?>" target="_blank"><?php echo $lang['goto_homepage']; ?></a>&nbsp;&nbsp;</b>And delete it.

Now find:
Code: [Select]
<b><a href=<?php echo $site_sess->url("home.php?action=home"); ?> target=main>Control Panel Home</a></b>And delete it.

Next find:
Code: [Select]
Version: <b><?php echo SCRIPT_VERSION?></b>Replace with:
Code: [Select]
<?php echo date("l d F, Y");
echo <<<END
<span id=tick2>
</span>

<script>
<!--

/*By JavaScript Kit
http://javascriptkit.com
Credit MUST stay intact for use
*/

function show2(){
if (!document.all&&!document.getElementById)
return
thelement=document.getElementById? document.getElementById("tick2"): document.all.tick2
var Digital=new Date()
var hours=Digital.getHours()
var minutes=Digital.getMinutes()
var seconds=Digital.getSeconds()
var dn="pm"
if (hours<12)
dn="am"
if (hours>12)
hours=hours-12
if (hours==0)
hours=12
if (minutes<=9)
minutes="0"+minutes
var ctime=hours+":"+minutes+""+dn
thelement.innerHTML="&nbsp;"+ctime+""
setTimeout("show2()",1000)
}
window.onload=show2
//-->
</script>
END;

?>
Please be sure that there is no spaces after END; and echo <<<END

Find:
Code: [Select]
show_nav_header($lang['nav_categories_main']);
show_nav_option($lang['nav_categories_edit'], "categories.php?action=modifycats");
show_nav_option($lang['nav_categories_add'], "categories.php?action=addcat");
Add above:
Code: [Select]
$root_path = $site_sess->url(ROOT_PATH);
show_nav_header($lang['nav_navigation_main']);
show_nav_option($lang['nav_navigation_admin_index'], "home.php?action=home");
show_nav_option($lang['nav_navigation_site_home'], "$root_path");
show_nav_option($lang['nav_navigation_phpmyadmin'], "PHPMYADMIN LINK");
Where it says PHPMYADMIN LINK enter the exact location to your phpMyAdmin manager.
--------------------
Open lang/<your language>/admin.php

Find:
Code: [Select]
$lang['nav_categories_main'] = "Categories";Add above:
Code: [Select]
$lang['nav_navigation_main'] = "Navigation";
$lang['nav_navigation_admin_index'] = "Admin index";
$lang['nav_navigation_site_home'] = "Site home";
$lang['nav_navigation_phpmyadmin'] = "phpMyAdmin";
--------------------

That's it. Save and close files.
Log in to your admin CP to see the changes.
Feedback about this mod would be well appreciated thanks.

Carl

4
Plugins / [Plugin] Notepad in Control Panel
« on: June 08, 2003, 06:53:32 AM »
A simple notepad for your admin control panel. Use it to write yourself reminders or maybe the names of users who you are keeping an eye on. Notes are stored on your MYSQL database so they are always to hand.

--------------------------------------------------------------------
Installation:

- Run MYSQL query
Quote
CREATE TABLE admin_notes (
  notes text NOT NULL,
  width char(3) NOT NULL default '',
  height char(3) NOT NULL default '',
  FULLTEXT KEY notes (notes)
) TYPE=MyISAM;

INSERT INTO admin_notes VALUES ('Your notes', '100', '10');
- Create a new directory called plugins in your admin folder
- Extract the zip and copy the file notepad.php to the new plugins directory
- Log in to your Control Panel, a new link should appear in the left navigation frame
- Click it to view your notepad

--------------------------------------------------------------------

I hope everyone finds this mod useful.

Carl

5
Installation, Update & Configuration / *.ram files
« on: June 05, 2003, 12:30:57 PM »
Does anyone know how I can use 4images to work with *.ram files?

I can't store the original *.rm files on my server because I don't have the bandwidth to stream them correctly. So by me creating a *.ram file which connects to my other high speed server seems to be the only way I can offer media on my site.

Any help on this would be greatly appreciated.

Carl

6
Plugins / [Plugin] Postcard Viewer
« on: May 20, 2003, 01:53:30 AM »
Hi I am writing a little mod so I can view postcards people have sent from my site. I have come up with the following code but it needs a tiny tweak which I'm having problems with. Can anyone help? Heres the code.
Code: [Select]
<?PHP

$result = "SELECT p.postcard_id, p.image_id, p.postcard_date, p.postcard_bg_color, p.postcard_border_color, p.postcard_font_color, p.postcard_font_face, p.postcard_sender_name, p.postcard_sender_email, p.postcard_recipient_name, p.postcard_recipient_email, p.postcard_headline, p.postcard_message, i.image_name, i.cat_id, i.image_media_file, i.image_thumb_file, p.postcard_confirm
            FROM ".POSTCARDS_TABLE." p, ".IMAGES_TABLE." i
            WHERE p.image_id = i.image_id";
while($row = mysql_fetch_array($result))
{    
    $postcard_id = $row["postcard_id"];
$postcard_date = date("D d M, Y g:i a", $row["postcard_date"]);
$image_id = $row["p.image_id"];
$postcard_bg_color = $row["p.postcard_bg_color"];
$postcard_border_color = $row["p.postcard_border_color"];
$postcard_font_color = $row["p.postcard_font_color"];
$postcard_font_face = $row["p.postcard_font_face"];
$postcard_sender_name = $row["p.postcard_sender_name"];
$postcard_sender_email = $row["p.postcard_sender_email"];
$postcard_recipient_name = $row["p.postcard_recipient_name"];
$postcard_recipient_email = $row["p.postcard_recipient_email"];
$postcard_headline = $row["p.postcard_headline"];
$postcard_message = $row["p.postcard_message"];
$cat_id = $row['i.cat_id'];
$image_media_file = $row[i.'image_media_file'];

echo <<<END
<table cellspacing="0" cellpadding="1" align="center" border="0">
  <tbody>
    <tr>
      <td bgcolor="$postcard_border_color"><table cellspacing="0" cellpadding="10" bgcolor="$postcard_bg_color" border="0">
  <tbody>
    <tr>
      <td valign="top"><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif">$postcard_date</font><br><a href="/details.php?image_id=$image_id" target="_blank"><img src="/data/media/$cat_id/$image_media_file" border="0"></a><br>
        <br> <font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif">$postcard_recipient_name - </font>
<a href="mailto:$postcard_recipient_email"><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif">$postcard_recipient_email</font></a></td>
      <td valign="top" width="200" height="250"><div align="right"><img src="/templates/myleeneklass/images/stamp.gif" border="0"></div>
        <br> <br> <b><font face="$postcard_font_face" color="$postcard_font_color" size="4">$postcard_headline</font></b><br>
        <br> <font face="$postcard_font_face" color="$postcard_font_color" size="2">$postcard_message</font><br>
        <br> <font face="$postcard_font_face" color="$postcard_font_color" size="2">$postcard_sender_name</font><br> <a href="mailto:$postcard_sender_email"><font
                  face="$postcard_font_face" color="$postcard_font_color" size="2">$postcard_sender_email</font></a></td>
    </tr>
  </tbody>
</table></td>
    </tr>
  </tbody>
</table><br>
END;
}  

?>

Thanks in advance

Carl

7
Mods & Plugins (Requests & Discussions) / phpbb intergration cookie
« on: May 10, 2003, 12:17:03 AM »
I have noticed that since intergrating 4images with phpbb, when I check the 'Remember Me' box on the login form on either 4images login or phpbb login. When I leave my site then come back maybe 15 minutes later I have to again log in.

Can anyone please tell me what might be wrong?

I have visited other people 4images sites on here and signed up and during login I have checked the 'Remember Me' box. I then visit the site a week later and I am already logged in as I should be.

Help would be nice, thanks

Carl

8
Installation, Update & Configuration / print stats
« on: May 04, 2003, 06:47:28 AM »
I've had this script for about 6 months now and only just discovered that if you add:
Code: [Select]
define('PRINT_STATS', '1');
to includes/constants.php you get some useful information pronted at the bottom of your page. Information like this:
Quote
Page generated in 1.425211 seconds with 14 queries, spending 0.178000 seconds doing MySQL queries and 1.247211 doing PHP things. GZIP compression disabled

I was wondering if its possible to take it one step further by being able to place it in another location on the page using the same methord as the control panel link.

for example if you put {PRINT_STATS} on the top of your page, the print stats would be displayed there.

Please someone guide me in the right direction with this, It gives much more accurate information than my current counter.

Carl

9
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;
?>

10
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

11
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

12
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

13
Installation, Update & Configuration / Rate form autojump
« on: April 08, 2003, 09:37:55 PM »
Does anyone know how to make the rate form on the details page an autojump menu like the category select box?

Thanks in advance

carl

14
Installation, Update & Configuration / Category Date Added
« on: April 06, 2003, 10:05:20 PM »
is it possible to display beside a category, when the category was created? this would be very useful

15
Installation, Update & Configuration / Main Category
« on: April 06, 2003, 05:06:08 PM »
I was wondering if there is a way to access the main category?

To access my first category listed under the main category I type this:

Quote
http://www.mydomain.com/4images/categories.php?cat_id=1


Can I access the main category by typing something similar? like this:

Quote
http://www.mydomain.com/4images/categories.php?cat_id=0


help would be great

Thanks Carl

Pages: [1] 2