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

Pages: [1]
1
Mods & Plugins (Requests & Discussions) / Re: Newest images - List Only?
« on: October 28, 2011, 05:26:18 PM »
The mysql query I used shows only images available for guests. Try remove these two lines and see if it show you anything:
Code: [Select]
AND c.auth_viewcat=".AUTH_ALL." /*only categories accessible for guests*/
AND c.auth_viewimage=".AUTH_ALL." /*only images accessible for guests*/


MOST EXCELLENT!!  That did it!!

I thought that specifying "guest" was the right way to approach this, but removing it took care of the problem. In hindsight however, my gallery FULLSIZE views are restricted, login is required for FULLSIZE.  I didn't notice before, but since the script(s) are fetching from the IMAGES_TABLE, is that what was causing the blank return?

Also, the output was returning...

   ht tp://mydom/mygallery/ht tp://mydom/mygallery/data/media/...(etc)

...so I changed the path back to "/" and that took care of that.  And also changed MEDIA_DIR to THUMB_DIR for lists of the smallers pics.

This is working really well. Do you think I would be able to apply this same method to a custom search script? This will be VERY HANDY.  THANKS a TON V@no!!!  :)

2
Mods & Plugins (Requests & Discussions) / Re: Newest images - List Only?
« on: October 26, 2011, 06:10:44 PM »
Upload attached file to your 4images root directory

Thanks V@no...  Reading your code, this is exactly what I've been trying to do. My attempts at the script were very similar to yours.  However, I'm still having problems. The script does not error -- but it does not echo anything, just a blank white page. The source of the page is blank as well -- same thing my scripts were doing.

I entered the $path as required. (i.e., "ht tp://mydom/mygallery/")
The 'ROOT_PATH' is... define('ROOT_PATH', './');   ...same as it is in my RSS.php (and everywhere else)
I can't seem to find anything else that looks like it should be edited. My 4images installation (v. 1.7.7) is pretty much default - no major mods. That's why I'm left scratching my head why this doesn't display.
Is there anything else I might need to edit?

Thanks V@no!

3
Mods & Plugins (Requests & Discussions) / Re: Newest images - List Only?
« on: October 22, 2011, 10:51:43 PM »
Hi Rembrandt... and thanks.

If I'm reading your code correctly, what you've demonstrated is pretty much what I have and what the gallery already does very nicely. Outputting formatted HTML. What I was after was sort of a utility php script that, when called, simply outputs a bare, raw ascii text list of the newest images.  I've been successful at a fair amount of tweaks and changes to my gallery but -- for whatever reason -- I haven't yet figured out how to make a simple script that does away the the html for a bare bones text list display of the newest pics...  I'm such a n00b! HAHA

4
Mods & Plugins (Requests & Discussions) / Newest images - List Only?
« on: October 22, 2011, 07:43:41 PM »
Hi,

Has anyone ever done this -- or does anyone know how?  I've been trying to make a way of outputting a simple text list of the newest images but I'm not having any luck.  I've tried reusing some of the code in the index.php file, and I also tried using...

http://www.4homepages.de/forum/index.php?topic=1179.msg5288#msg5288

...but I'm still dead in the water! (Mostly because I'm not too familiar with php & sql, yet.)  All I am shooting for is a vertical list like this...

ht tp://mydomain.com/my4imagesgallery/data/thumbnails/10/apples.jpg
ht tp://mydomain.com/my4imagesgallery/data/thumbnails/12/oranges.jpg
ht tp://mydomain.com/my4imagesgallery/data/thumbnails/19/peaches.jpg
ht tp://mydomain.com/my4imagesgallery/data/thumbnails/24/pears.jpg

...and so on. Is there a simple way to do this? Any help VERY MUCH APPRECIATED! :)

Thanks

5
You're right V@no. I guess I assumed others already knew about jquery & jalerts.


First go grab the latest jQuery library...
http://jquery.com/

Then the jQuery UI Draggable plugin...
http://docs.jquery.com/UI/Draggable


Then jalerts...
http://abeautifulsite.net/blog/2008/12/jquery-alert-dialogs/
http://labs.abeautifulsite.net/projects/js/jquery/alerts/demo/
http://labs.abeautifulsite.net/projects/js/jquery/alerts/jquery.alerts-1.1.zip

Upload those libs somewhere on your server.

Add this into the <head> of the header.html template file...
Code: [Select]
<!-- Dependencies -->
<script src="/path/to/jquery.js" type="text/javascript"></script>
<script src="/path/to/jquery.ui.draggable.js" type="text/javascript"></script>
<!-- Core files -->
<script src="/path/to/jquery.alerts.js" type="text/javascript"></script>
<link href="/path/to/jquery.alerts.css" rel="stylesheet" type="text/css" media="screen" />

 * tweak the "jquery.alerts.css" file to suit your needs and point to your custom images.



Then replace the default right-click disabler with this...
Code: [Select]
{ifno is_admin}

  function right(e) {
    if ((document.layers || (document.getElementById && !document.all)) && (e.which == 2 || e.which == 3)) {
      msg(e);
      return false;
    }
    else if (event.button == 2 || event.button == 3) {
      msg(e);
      return false;
    }
    return true;
  }

  function msg(e)
  {
    var target = window.event ? window.event.srcElement : e ? e.target : null;
    if (target.type != "text" && target.type != "textarea" && target.type != "password")
    {
      //original alert...
      //alert("© Copyright by <?=str_replace("'","\'", "{site_name}");?>");

      //NEW ALERT
  jAlert('MESSAGE HERE', 'TITLE HERE');
      return false;
    }
    return true;
  }

  if (document.layers){
    document.captureEvents(Event.MOUSEDOWN);
    document.onmousedown = right;
  }
  else if (document.all && !document.getElementById){
    document.onmousedown = right;
  }

document.oncontextmenu = msg;

{endifno is_admin}


This displays the custom alertbox on right click, yet allows right click anywhere for ADMIN, and allows any user to right click in an input box, or text area.

The jQuery site has lots of other cool image tools that I'm going to look into as well.


Cheers!

6
Hello...
I have a great looking (jalert/jquery) right-click disabled dialog working but haven't been able to work it into...

"Right click popup for everyone, but allow right click on input and textarea fields"
http://www.4homepages.de/forum/index.php?topic=3088.msg12864

This particular edit uses a msg box rather than the alert used initially. This msg code...

Code: [Select]
alert("© Copyright by {site_name}");
return false;

is replaced by...

Code: [Select]
msg(e);
return false;


The jalert dialog I'm using takes this form...

Code: [Select]
jAlert('Message Here', 'Title Here');return false");

When I replace the "msg(e)" and "return false", the right-click disabler is failing somehow and the context menu still pops up, but I'm not sure why. Just in case, here's what I have that does work, but without the input and text objects enabled...

Code: [Select]
{ifno is_admin}
  function right(e) {
    if ((document.layers || (document.getElementById && !document.all)) && (e.which == 2 || e.which == 3)) {
 jAlert('Message Here', 'Title Here');
      return false;
    }
    else if (event.button == 2 || event.button == 3) {
 jAlert('Message Here', 'Title Here');
      return false;
    }
    return true;
  }

  if (document.layers){
    document.captureEvents(Event.MOUSEDOWN);
    document.onmousedown = right;
  }
  else if (document.all && !document.getElementById){
    document.onmousedown = right;
  }

document.oncontextmenu = new Function("jAlert('Message Here', 'Title Here');return false");
{endifno is_admin}


:::::::: UPDATE ::::::::

Not even two minutes after all the typing above, I figured out what I was doing wrong. So, if anyone is interested, here's what worked...

Code: [Select]
{ifno is_admin}

  function right(e) {
    if ((document.layers || (document.getElementById && !document.all)) && (e.which == 2 || e.which == 3)) {
      msg(e);
      return false;
    }
    else if (event.button == 2 || event.button == 3) {
      msg(e);
      return false;
    }
    return true;
  }

  function msg(e)
  {
    var target = window.event ? window.event.srcElement : e ? e.target : null;
    if (target.type != "text" && target.type != "textarea" && target.type != "password")
    {
      //alert("© Copyright by <?=str_replace("'","\'", "{site_name}");?>");
 jAlert('Message', 'Title');
      return false;
    }
    return true;
  }

  if (document.layers){
    document.captureEvents(Event.MOUSEDOWN);
    document.onmousedown = right;
  }
  else if (document.all && !document.getElementById){
    document.onmousedown = right;
  }

document.oncontextmenu = msg;

{endifno is_admin}

7
Discussion & Troubleshooting / Modified Search Files & Results?
« on: September 18, 2010, 05:46:24 PM »
I am trying to create a separate set of search files and display separately different search results. The original search would remain as-is, (I want to keep it), but the new search set will display the search results from a new template -- one I can change any way I need to without affecting the original, public-used search.

I have copied search.php, search.html, and thumbnail_bit.html to new filenames. I then want to mod the new files to display search results differently than the first, original set. Is there anything else I need to copy and modify as well? Has anyone done anything like this before?

In my new "search_custom.php", I found reference to "thumbnail_bit" and changed it according to the new filename "thumbnail_bit_custom". That is working and I can see my changes. Where in "search_custom.php" do I need to change reference to the "search.html" template to now point it to "search_custom.html"?

Also, and this is a big part of it... I want to use this new search set from the URL (commandline). Is there a way to do this without the session id? Will the "&perpagebox=#" parameter work on the URL? (So far I haven't been able to affect the number of results displayed.)

I hate asking for help because I like trying to do things myself, but you guys have been so helpful with my previous questions that I thought I would see what some of you guys think...

Thanks,
jim


8
I found this thread while searching the same problem.  If there is a mod that does this, could someone please point me in the right direction? Thanks.

What I'm wondering is if there is a way to flag specific images as "Restricted" upon upload and via the Admin Control Panel?  And, have a user Control Panel setting; Display Restricted Images: Yes / No?

User Control Panel: Display Restricted Images? Yes / No
Upload Form: Restricted Image? Yes / No
Admin Control Panel: Restricted Image? Yes / No

I've searched the forums and found mods that are really close to the same thing - but not quite. V@no's Terms & Conditions mod is very close and really slick...

http://www.4homepages.de/forum/index.php?topic=7113.0

...very cool. And I may end up using that mod instead. But I'm wondering if there are any other mods that are even closer to what I, (and the above poster), are asking?


Many Thanks to anyone who can point me in the right direction.


9
Discussion & Troubleshooting / Re: Subcatagories out of sequence
« on: July 17, 2010, 10:31:29 PM »
ahhh SNAP!!! So, I guess that was a stupid question. I was expecting there was something else tracking and controlling the category ID numbers. It was simpler than I was making it.

Thanks V@no!

10
Discussion & Troubleshooting / Subcatagories out of sequence
« on: July 16, 2010, 04:38:04 PM »
Hello,

I messed up and created a subcategory under the wrong parent category. I foolishly deleted it, rather than simply editing it and moving it to the correct category. Next, I recreated it under the correct category. Now, the numbered sequence skips that CatID#. I've, tried editing it back-on-track in phpMyAdmin but the next added sequence still skips by one (1). I have and looked for data files, records, and searched here to find where that sequence is stored but can't seem to find anything. What do I need to do to restore sequential CatID# order?  :oops:

Thanks much!

11
Discussion & Troubleshooting / Re: Import Custom CSV/Re-Index?
« on: July 13, 2010, 11:45:18 PM »
Yes, that is exactly what that plugin does.
It reads info about images from images table and updates wordlist/wordmatch with that info.

Excellent! I thought so, but wanted to make absolutely sure before I moved on to thousands more pics.

Thanks V@no!

12
Discussion & Troubleshooting / Import Custom CSV/Re-Index?
« on: July 13, 2010, 11:14:51 PM »
I have already successfully tested importing a properly formatted csv file (containing Image Name, Description, Keywords, etc.) into the "images" table and have uploaded images to the appropriate folders. That's easy, and worked great. 

Before I go to the next step and work up my entire image collection, my question is...  will the Rebuild Search Index plugin update the "wordlist" and "wordmatch" tables with the newly imported info? Does this plugin read the Keywords field from the "images" table, then update the "wordlist" and "wordmatch" tables? Or, will I also have to create and import those files as well?

I hope that question makes sense. Thanks.

13
Hey Rembrandt,

THANKS!!! I must have looked at nearly every file EXCEPT that one... of course.

The edit and rebuild plugin worked flawlessly. Thanks again!

14
Discussion & Troubleshooting / Search limited to more than 2 chars?
« on: July 08, 2010, 05:02:30 PM »
I am finding that search terms of less than 3 characters in length are not found. For example

NOT FOUND:
.../search.php?search_fields=image_keywords&search_keywords=30

FOUND:
.../search.php?search_fields=image_keywords&search_keywords=300


Is there a way to configure the search engine to accept search terms that are two characters in length?

Pages: [1]