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

Pages: [1]
1

Latest.

I followed these instructions and now have it working, thanks for this forum and pointing me in the right direction,, thanks again !! :lol:







hi all..
http://www.siteshot.at/nicky.htm

your examples can't work.. if you don' use correct code like descriped in the MOD file..

ROOT != ROOT_PATH  :roll:  :lol: :P 8)

use EXACT following code:


<?php
define
('ROOT_PATH''./');
define('SCRIPT_URL''http://gallery.rammstein-europe.com/');
include(
ROOT_PATH.'config.php');
include(
ROOT_PATH.'includes/db_mysql.php');
include(
ROOT_PATH.'includes/constants.php');

$site_db = new Db($db_host$db_user$db_password$db_name);
function 
is_remote($file_name) {
  return (
preg_match('#^https?\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i'$file_name)) ? 0;
}

$sql "SELECT COUNT(*) as total_images
        FROM "
.IMAGES_TABLE." a, ".CATEGORIES_TABLE." b 
        WHERE a.image_active=1 
        AND a.cat_id = b.cat_id 
        AND b.auth_viewcat="
.AUTH_ALL.
        AND b.auth_viewimage="
.AUTH_ALL."
        "
;
$row $site_db->query_firstrow($sql);
$total_images $row['total_images'];

mt_srand((double)microtime() * 1000000);
$number = ($total_images 1) ? mt_rand(0$total_images 1) : 0;

$sql "SELECT a.image_id, a.cat_id, a.image_name, a.image_active, a.image_media_file, a.image_comments 
        FROM "
.IMAGES_TABLE." a, ".CATEGORIES_TABLE." b 
        WHERE a.image_active=1 
        AND a.cat_id = b.cat_id 
        AND b.auth_viewcat="
.AUTH_ALL.
        AND b.auth_viewimage="
.AUTH_ALL.
        LIMIT 
$number, 1";
$row $site_db->query_firstrow($sql);
$image_id $row['image_id'];
$cat_id $row['cat_id'];
$image_name $row['image_name'];
$image_comments $row['image_comments'];
$full_src = (is_remote($row['image_media_file'])) ? $row['image_media_file'] : SCRIPT_URL.ROOT_PATH.MEDIA_DIR."/".$cat_id."/".$row['image_media_file'];

print(
"
document.write('<a href=\""
.SCRIPT_URL."details.php?image_id=$image_id\"><img src=\"".$full_src."\" border=\"1\" alt=\"$image_name\"></a>');
"
);
?>


Code: [Select]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <meta http-equiv="content-type" content="text/html; charset=windows-1250">
  <meta name="generator" content="PSPad editor, www.pspad.com">
  <title></title>
  </head>
  <body>
LOL

<SCRIPT language='JavaScript'  src='http://gallery.rammstein-europe.com/random.php'></SCRIPT>
  </body>
</html>

[EDIT by V@no]
corrected index.html to avoid confusion ;) their original code was correct.


2
.

I now have random.php file working but i can't get my test.php file to work.

The code in my test.php points to the folder i have the random.php file in, along with the config file.

Any ideas

<?php
include(' gallery/random.php')
?>

UPDATE!

Now I have test.php working correctly but the random.php file does not.

random.php file does not show anything when i directly access it in the browser

to get the test.php to work i have this in my code

<?php
define('ROOT_PATH', './gallery/');
define('SCRIPT_URL', 'http://mydomain.com/gallery/');


AND I removed ROOT_PATH. from this line.


$full_src = (is_remote($row['image_thumb_file'])) ? $row['image_thumb_file'] : SCRIPT_URL.THUMB_DIR."/".$cat_id."/".$row['image_thumb_file'];


Now that my test.php works, is it possible to create a java script so that i can run  random images on another web site using the test.php genereated images?




3
Thanks for the answer
I wasn't sure if i had got it right, but this is the whole code i have in the random.php file, but it fails to display anything, is there any other files i need to edit. I am using 1.7.7

<?php
define('ROOT_PATH', './gallery/');
define('SCRIPT_URL', 'http://mydomain.com/gallery/');
include(ROOT_PATH.'config.php');
include(ROOT_PATH.'includes/db_mysql.php');
include(ROOT_PATH.'includes/constants.php');

$site_db = new Db($db_host, $db_user, $db_password, $db_name);
function is_remote($file_name) {
  return (preg_match('#^https?\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i', $file_name)) ? 1 : 0;
}

$sql = "SELECT COUNT(*) as total_images
        FROM ".IMAGES_TABLE." a, ".CATEGORIES_TABLE." b
        WHERE a.image_active=1
        AND a.cat_id = b.cat_id
        AND b.auth_viewcat=".AUTH_ALL."
        AND b.auth_viewimage=".AUTH_ALL."
        ";
$row = $site_db->query_firstrow($sql);
$total_images = $row['total_images'];

mt_srand((double)microtime() * 1000000);
$number = ($total_images > 1) ? mt_rand(0, $total_images - 1) : 0;

$sql = "SELECT a.image_id, a.cat_id, a.image_name, a.image_active, a.image_media_file, a.image_comments
        FROM ".IMAGES_TABLE." a, ".CATEGORIES_TABLE." b
        WHERE a.image_active=1
        AND a.cat_id = b.cat_id
        AND b.auth_viewcat=".AUTH_ALL."
        AND b.auth_viewimage=".AUTH_ALL."
        LIMIT $number, 1";
$row = $site_db->query_firstrow($sql);
$image_id = $row['image_id'];
$cat_id = $row['cat_id'];
$image_name = $row['image_name'];
$image_comments = $row['image_comments'];
$full_src = (is_remote($row['image_media_file'])) ? $row['image_media_file'] : SCRIPT_URL.ROOT_PATH.MEDIA_DIR."/".$cat_id."/".$row['image_media_file'];

print("
document.write('<a href=\"".SCRIPT_URL."details.php?image_id=$image_id\"><img src=\"".$full_src."\" border=\"1\" alt=\"$image_name\"></a>');
");
?>

4
Does this look right ?


<?php
define('ROOT_PATH', './gallery/');
define('SCRIPT_URL', 'http://mydomain.com/gallery/');
include(ROOT_PATH.'config.php');
include(ROOT_PATH.'includes/db_mysql.php');
include(ROOT_PATH.'includes/constants.php');

5
Mods & Plugins (Releases & Support) / Re: [MOD] Category Image v1.0.2
« on: July 15, 2010, 05:57:38 PM »
ok, cheers!

6
Mods & Plugins (Releases & Support) / Re: [MOD] Category Image v1.0.2
« on: July 15, 2010, 12:46:27 PM »
Hi, i am using 1.7.7 Does that mean i don't have to change anything in the global as i can not see the line that needs changing ?

7
Thanks,

I'm very new to all this, what led me to the spider check site was that when i put the url path to one of my gallery images  on google it showed the in the search but added that it didn't match any documents, i had thought the link would at least show live, so thought there was a problem with the generated url.
If i copy and post it into to my browser it works.

Then when i checked with the spider check i noticed the period and thought that might have been another problem!

seperatley - one thing i came across
the orginal sar file at the start of the thread does not have this line in the htaccess file

RewriteRule ^cat\.htm$ categories.php?%{QUERY_STRING}

which i needed to add to make the cagegory drop down box work, i dont know if it is worth mentioning somewhere on the first post?

8
ok this morning i have created a new database and uploaded new 1.7.7.
Made no alterations to the orginal script other than add the sar file that comes at the start of this thread.

thats the
HTACCESS file AND THE SESSIONS PHP

everything looks fine, only when i check with

http://www.webconfs.com/search-engine-spider-simulator.php

i get the same problem
http://www.mydomain.com/./new-site-test-1.htm

where the period replaces the folder name ??



9
No robots txt but i did write  a no follow on to a file, but i have forgot which one, i will have to go back and try and figure if it was that.

I had added <a rel="nofollow"href="' in the code of functions php when i added the keyword cloud code.
maybe i missunderstood what it would have done, it was suggested on one of the boards,  does that look like something that might cause the problem, i have removed it and will test again.
just tested and the problem is still there, apart from that i cant think of much else i have changed.



does the htaccess file look correct
RewriteEngine On
RewriteRule ^lightbox\.htm$ lightbox.php?%{QUERY_STRING}
RewriteRule ^lightbox\.([0-9]+)\.htm$ lightbox.php?page=$1&%{QUERY_STRING}
RewriteRule ^search\.htm$ search.php?%{QUERY_STRING}
RewriteRule ^search\.([0-9]+)\.htm$ search.php?page=$1&%{QUERY_STRING}
RewriteRule ^postcard([a-zA-Z0-9]+)\.htm$ postcards.php?postcard_id=$1&%{QUERY_STRING}
RewriteRule ^postcard\.img([0-9]+)\.htm$ postcards.php?image_id=$1&%{QUERY_STRING}
RewriteRule ^k-(.*)-([0-9]+).htm categories.php?cat_id=$2&%{QUERY_STRING}
RewriteRule ^r-(.*)-([0-9]+).htm details.php?image_id=$2&%{QUERY_STRING}
RewriteRule ^r([0-9]+).search.htm details.php?image_id=$1&%{QUERY_STRING}


10
I have recently installed best seo mod on 1.77 and it works fine generates the url nicely within the site.

However when i check on google the pages have not been picked up. When i use a tool to see what a spider sees for search engine purposes, the url shows this,

http://www.mydomain/./image-4.htm

Where the folder i have installed 4images  to is replaced with a "."

Is there another file i have to change to make the folder show in the generated url for search engines to find ?


i used the download files from the first page
also i have upload the pre-edited files for 1.7.4 http://rapidshare.com/files/33076491/seo.rar.html
this seo.rar file contains .htaccess file and /include/sessions.php file you can use it withour modifying

11
I am using 1.7.7 and i am trying to get an extra coloumn in the members page to post some help tips when uploading, can someone help with posting the html i would  need for that. I keep trying and i am getting tables and rows all over the place.

much appreciated

12
After uploading an image, i have then gone to edit it and used the settings to inidcate a url for the image

I assumed this would then make the download button into a link and bring the user to the web address

Now when i click on the download button the web address comes up but it is in binary, is there something i need to change extra and make this turn iinto a link?

I have looked everywhere to find the answer on here, but hope i have asked the question clearly



 :lol: ok fixed it, needed to add / at the end or the url

Pages: [1]