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 - Maniac

Pages: [1] 2
1
I've been digign through my server; found more stuff...

Also, did some web searches and found this

http://w4ck1ng.com/board/showthread.php?p=13352


2
1.71 and I immediately upgraded to 1.7.4 - The file that was hacked was search.html in the templates folder


3
I was running 1.71 but now I have 1.74...

4
I just deleted the search.php file on two of my sites because ti seemd to pose a security threat;

I am not knowledgable enough so if some one can confirm I'd a appreciate it; ANyone one of you who have had this issue please check your files.

Earlier today none of the images on my site displayed (as described above). I discovered that the only file type allowed for the uplaod was php; I reset the file types to jpg, gif, etc. and then went to check my site; I was clicking around and when I clicked "New Images" I got a very disturbing page instead of the regular table with my new images;

This page had a header titled: r57shell 1.23 and basically proceeded to display every setting on my server, including directory structure, paths and the ability to exectue a shell command via form;

This was not right so I canned it...

I eagerly await what anyone else finds and hope that nothing on anyone's sites has been compromised...


5
Same boat - This happened to me today as well - All images are on the server...

I did notice that the valid types on my install were all removed and the only valid file type was now "php"

6
OK, I figured it out :)

It was actually very simple.

Here's what I did:

1. Created a duplicate of categories.php and renamed it simpleCats.php
2. In simpleCats.php I changed the names of the used templates from:

Code: [Select]
$templates_used = 'categories,category_bit,thumbnail_bit';
$main_template = 'categories';
To:
Code: [Select]
$templates_used = 'simpleCats,simpleCats_bit,simpleNail_bit';
$main_template = 'simpleCats';

* make sure to scan the file for ther instances of the templates...

3. I then simply duplicated the original templates and renamed them accordingly and modified them to suit.

4. In simpleNail_bit I changed {thumbnail} to {thumbnail_openwindow}

5. In simpleCats.html I added the following javascript to the head of my document (make sure to change yourDomain to your url):

Code: [Select]
<script language="Javascript">
 function PopupPic(sPicURL) {
  window.open( "http://www.yourDomain.com/popUp.html?"+sPicURL, "",
  "resizable=1,HEIGHT=200,WIDTH=200");
 }
</script>

6. I then created a file called popUp.html with the following code:

Code: [Select]
<HTML>
<HEAD>
<TITLE>From The Gallery</TITLE>
<script language='javascript'>
 var arrTemp=self.location.href.split("?");
 var picUrl = (arrTemp.length>0)?arrTemp[1]:"";
 var NS = (navigator.appName=="Netscape")?true:false;

  function FitPic() {
   iWidth = (NS)?window.innerWidth:document.body.clientWidth;
   iHeight = (NS)?window.innerHeight:document.body.clientHeight;
   iWidth = document.images[0].width - iWidth;
   iHeight = document.images[0].height - iHeight;
   window.resizeBy(iWidth, iHeight);
   self.focus();
  };
</script>
</HEAD>
<BODY bgcolor="#000000" onload='FitPic();' topmargin="0" marginheight="0" leftmargin="0" marginwidth="0">
<script language='javascript'>
document.write( "<img src='" + picUrl + "' border=0>" );
</script>
</BODY>
</HTML>

Finally I updated functions.php:

find:
Code: [Select]
$thumb = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id.((!empty($mode)) ? "&amp;mode=".$mode : ""))."\" onclick=\"opendetailwindow()\" target=\"detailwindow\">".$thumb."</a>";
and replace it with:
Code: [Select]
$thumb = "<a href=\"javascript:PopupPic('"."/gallery/data/media/".$cat_id."/".$thumb_file_name."')\">".$thumb."</a>";
*note that the path to my gallery is "/gallery" you may have to update yours accordingly.

Uploaded everything and it worked.

Now when I call "simpleCats.php?cat_id=#" I get all the thumbs in the category as expected. and when I click them I get a pop up that displasy only the image requested - the pop-up automatically resizes to fit the image size :)

You can see a sample here:

http://photo.frescodesigns.com/simpleCats.php?cat_id=63

Hope someone can find this useful

7
After a little more thought I think I'm making it more complicated than it needs to be...

I still need a bit of help, but I think I figured out a much easier way.

I did everything the same as outlined above, but in my new thumbnail bit file I changed the {thumbnail} variable to {thumbnail_openwindow}. The in functions.php I just changed the link that is generated when openwindow is specified.

Ido however, need to specify the full path to the image - and not the id.

so, instead of:

Code: [Select]
$thumb = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id.((!empty($mode)) ? "&amp;mode=".$mode : ""))."\" onclick=\"opendetailwindow()\" target=\"detailwindow\">".$thumb."</a>";
I need to change it to something like:

Code: [Select]
$thumb = "<a href=\"".$site_sess->url("javascript:PopupPic(\'"PATH-TO-IMAGE((!empty($mode)) ? "&amp;mode=".$mode : ""))."\')\">".$thumb."</a>";
Anyone know what I should put instead of Path to image to achieve this?

The javascritp is something I found elsewhere and which will resize the pop up to the image size...

Thanks in advance

8
II have created an alternate categoy dsplay page - basically a duplocate of categories.php but with an entirely different layout (for a differen section of my site).

In addition, I have created a new set of templates for my new categories page to use. : i.e.

simpleCtas.php uses "simpleCats.html, simpleCat_bit.html and simpleNail_bit.html"

What I want to do is create an alternate version of the {thumbnail} variable with it's own styling and a link to a pop-up (image only). I looked in functions and created

Code: [Select]
"thumbnail2" => get_thumbnail_code($image_row['image_media_file'], $image_row['image_thumb_file'], $image_row['image_id'], $image_row['cat_id'], $image_row['image_name'], $mode, $show_link),
am I on the right track?

What do I need to change so that the link on my new variable is to a popo-up?

Thanks in advance for any guidance in the right directon...

9
Yes I found those as well...

I'll see if I can modify the new images one to fit my needs - if you come accross one that allows to specify a categgory please post here.

Thanks for your help :)

10
I would, but I have lots of categories and images are changed and added regularly - prefebly it's done dynamically...

I basically want to dfinew which categroy (id) to pull from and have the thumbnails display...

11
Is it possible to display specific categiry thumbnails on an external page? Tried searchnig for s mod but did't find one...

Any guidance would be appreciated.

12
Perfect - exactly what I needed :)

Thanks!

13
Discussion & Troubleshooting / Download URL problem
« on: December 29, 2005, 05:37:24 AM »
I have a video category and want to specify a download url for each video so that the videos are viewed locally rather than on my server.

What I'm doing is the following:

1. Uploading both the video and a single frame of the video into the video category.
2. After validating the image/video I set the actual video (.mov file) to "inactive" so it does not show up in the category listing
3. Then, I set the download url of the image to point to the actual video file - i.e. "/data/media/50/movie.mov"

When I browse to the image and try to download the video by clicking the download button It simply attempts to download the image "/download.php?image_id=1075"

any advice would be appreciated.

14
THANK YOU - Exactly what I was looking for... :D

15
Templates & Styles (Requests & Discussions) / Re: Testing templates
« on: September 13, 2005, 05:01:16 AM »
I have 1.71 and it worked for me.

Are you logged in as admin when trying. I know I kept trying it out and it wouldn;t work at first - turned out to be that.

One thing that I do before I paste the code from the forums on my files is make sure there are no "strange" characters sneaking by - that has often given me big headaches before.

I use BBEdit and basically select "view invisible elements" and often find thise strange characters... A simple search and replace fixes it.

Hope this helps. Also, could it be that you have another MOD installed in your pages that is affecting this one?

Pages: [1] 2