![]() |
|
|
#1 |
|
Member
Join Date: Jul 2003
Location: Bracknell UK
Posts: 246
|
I use snippets in my home page which now doesn't work. I cant even get the snippetdemo.php to work. Heres what I get from snippetdemo
Exhibit Engine SNIPPETS demo IMPORTANT SECURITY NOTE ABOUT SNIPPETS: Depending on how your PHP was installed, snippets can be called from external sites, too. If you want to prohibit that, or restrict snippets to specific site(s), insert the line if (trim($_SERVER["REMOTE_ADDR"]) != "127.0.0.1") { print "ip "; print $_SERVER["REMOTE_ADDR"] . " not allowed."; exit; } (where 127.0.0.1 is the IP you want to allow, e.g. your server's real IP) to the beginning of the snippets.php after first <?php line . To allow several IP's, reuse that line of code. NOTE that this method is not a foolproof because experienced hackers can forge IPs. If you need to ensure that snippets can not be called at all (for sake of resource usage and bandwidth), delete snippets.php from EE folder. If you want to ensure that only you can call the snippets, rename snippets.php to something that you know, e.g. HSJdkkdsk877823987321237871.php (it's an example, please don't use that!) and use that file. Snippets work in EE 2.0 with public view only (no user login). 10 LATEST GALLERIES $get = "latest_galleries"; $amount = "10"; $exhibition = ""; $thumbsize = ""; $viewas = ""; $includecategory = ""; $excludecategory = ""; $thumbclass = ""; $linkclass = ""; include("./snippets.php"); ip 86.129.220.185 not allowed. Alan
__________________
To call someone incompetent is unfair to those of us who are.... |
|
|
|
| sponsored links |
|
|
#2 |
|
El General Moderator
|
It's the IP filter. In snippets.php remove lines
PHP Code:
__________________
This signature signifies my significance significantly Photo Gallery ---------------------------- |
|
|
|
|
|
#3 | |
|
Member
Join Date: Jul 2003
Location: Bracknell UK
Posts: 246
|
Quote:
Alan
__________________
To call someone incompetent is unfair to those of us who are.... |
|
|
|
|
| sponsored links |
|
|
#4 |
|
Member
Join Date: Jul 2003
Location: Bracknell UK
Posts: 246
|
I may have been a bit hasty, snippets produces the thumbnails ok, but the links are wrong when you click on the thumbs. Can't quite figure out why.
A couple of other minor issues 1. IF you opt not to use a Photo frame around a picture, then the options to select small, medium or large images are hidden from view 2. My default picture size is medium, but the default displayed is always small. Where do I say what is the default? I thought it was in the Paths? Alan
__________________
To call someone incompetent is unfair to those of us who are.... |
|
|
|
|
|
#5 | |||
|
El General Moderator
|
Quote:
Quote:
Quote:
PHP Code:
__________________
This signature signifies my significance significantly Photo Gallery ---------------------------- |
|||
|
|
|
|
|
#6 | |
|
Member
Join Date: Jan 2004
Location: Central, North Carolina, USA
Posts: 399
|
Quote:
[time passes] in looking back at what i did here, i see that i took the ee_print_thumbs function and placed it into an include file and did a @require_once on it and there was a rather "large" mod/bugfix to handle a couple of special cases where $exhibition wasn't set properly plus a few other seemingly minor fixes... however, at this point, i'm not sure what, exactly, it was that i did to switch from "url_fopen" (is that right?) usage to simple local include usage... in any case, since i've not yet gotten ee2 installed and i don't currently use snippets anywhere other than some demo and playing around stuff, i guess i won't worry about it too much until after i get things in place and have a working ee2 gallery Last edited by wkitty42 : 4th of October 2006 (Wed) at 21:30. |
|
|
|
|
|
|
#7 |
|
Member
Join Date: Jul 2003
Location: Bracknell UK
Posts: 246
|
[quote=Pekka;2077710]
Originally Posted by gillyworld I may have been a bit hasty, snippets produces the thumbnails ok, but the links are wrong when you click on the thumbs. Can't quite figure out why. I'll look into that. quote] The problem occurs when the page using snippets is not in the same directory as the snippets code. I think in 1.5 this used a parm set in misc settings. Thanks Alan
__________________
To call someone incompetent is unfair to those of us who are.... |
|
|
|
|
|
#8 | |
|
Member
Join Date: Jan 2004
Location: Central, North Carolina, USA
Posts: 399
|
Quote:
[time passes] in my .htaccess file, i have something similar to the following Code:
php_value include_path ".;\shared\includes;\www\exhibits" this allows me to call that code from anywhere... of course, with exhibit engine, i also include the "prerequesite" (?) include paths so that the snippets libraries can also locate the ee data and code that they need to work properly... |
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Adding UDM4 to EE2 | Pekka | EE 2 Styles | 15 | 7th of June 2008 (Sat) 13:24 |
| Enhanced EE2 updater | MMCM | EE 2 Coding | 0 | 6th of May 2007 (Sun) 08:46 |
| EE2 Fresh Install | SuperFly | EE 2 Installation | 21 | 8th of March 2007 (Thu) 20:07 |
| EE2 Upload Problem | Pete | EE 2 Installation | 1 | 5th of March 2007 (Mon) 03:58 |
| EE2 Admin Logon | UweB | EE 2 Installation | 17 | 15th of December 2006 (Fri) 18:14 |