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

Pages: 1 2 [3] 4 5 6 7 ... 41
31
Kein Problem, vor 7 Jahren war ich derjenige der diese Fragen gestellt hat ;)

32
Komisches template...

Code: [Select]
<?php
 $tu 
"{template_url}";
 
$us "{url_search}";
 
$ls "{lang_search}";
 
$las "{lang_advanced_search}";
 
?>


nach {header} einfuegen ; )

33
Du musst in jeder template html einfach den bereich entfernen. In der home.html z.B. (ganz am anfang)

Code: [Select]
<tr>
 <td>
 <?php
 $tu 
"{template_url}";
 
$us "{url_search}";
 
$ls "{lang_search}";
 
$las "{lang_advanced_search}";
 require 
"{template_url}/incl/searchbox.php"
 
?>

 </td>
 </tr>

entfernen ofer auskommentieren.

 Gruss



34
Show / Hide Div's with Cookie?

I wanted to create a search navigation bar, witch will also be used in the category browsing - almost everywhere in the site. The navigation bar consists of two parts, the navigation and the filter.
Well the filter is really the search_form template, but redesigned.

So my biggest problem was to remember the div-state - an open filter should be open, a closed one should be closed. So there's only one way - using cookies (a pain in the ...).
Anyway, if you ever need a search filter (or closed/open div) with "memory function", here's the code:

First, we assign the cookie function (before the </head> tag):

Code: [Select]
<script type="text/javascript">


function Open(cls,nu,h,days){
 var objs=bycls(cls,document),z0=0;
 for (var z0=0;z0<objs.length;z0++){
  objs[z0].style.height=(z0!=nu?0:objs[z0].offsetHeight>h-5?0:h)+'px';
 }
 if (typeof(days)=='number'){
  cookieset(cls,nu+'|'+objs[nu].offsetHeight,days);
 }
 return false;
}

 function cookieget(nme){
  var rtn=cookie(nme),objs=bycls(nme,document);
  if (rtn){
   rtn=rtn.split('|');
   if (objs[rtn[0]]){
    objs[rtn[0]].style.height=rtn[1]+'px';
   }
  }
 }

 function cookie(nme){
  var re=new RegExp(nme+'=[^;]+','i');
  if (document.cookie.match(re)){
   return document.cookie.match(re)[0].split("=")[1];
  }
  return null
 }

 function cookieset(nme,v,days){
  document.cookie=nme+'='+v+';expires='+(new Date(new Date().getTime()+days*86400000).toGMTString())+';path=/';
 }

 function bycls(nme,el){
  for (var reg=new RegExp('\\b'+nme+'\\b'),els=el.getElementsByTagName('*'),ary=[],z0=0; z0<els.length;z0++){
   if(reg.test(els[z0].className)){
    ary.push(els[z0]);
   }
  }
  return ary;
 }

</script>

Then we need to search for the cookie (again before the closing head tag):

Code: [Select]
<script type="text/javascript">
window.onload = function() {
  cookieget('filter_search');
}
</script>


assign the div to our styleshteet (style.css) :

Code: [Select]
.filter_search {
position:relative;
overflow:hidden;
height:0px;
}

and put the div where you want to appear it:

Code: [Select]
<div class="filter_search">
your content
</div>

now we need to toggle it (show/hide). Best with a button, isn't it?
Draw a nice button and insert it like this:

Code: [Select]
<a class="filter_button" href="" onclick="return Open('filter_search',0,140,1);"></a>

The "140" you see is the height of the expanded div - change it to your needs.

So what's left? Aaah, the button. Assuming you didn't change filenames, put this in your style.css:

Code: [Select]
       .filter_button {
width: 90px;
height: 30px;
            cursor: pointer;
            display: block;
            background-image: url( 'images/filter.png' );

}
        .filter_button:hover {
            background-image: url( 'images/filter_hover.png' );
}

Just change the path/width/height to your button and you are ready to go.
So this is how it looks like on my sandbox (sorry, no demo available yet).



Closed filter bar





Button Hover





Expanded filter bar





If you need any help on that stuff, just drop me a line ;) Cheers

PS: Project will be finished in 6-7 days.
PPS: 4images is awesome!






35
[Tweak]

Since I am using bigger (and cropped) thumbnails for better design in my search I didn't like the information (comments, lightbox etc) to be shown when I just view the pictures. I decided to do a hover, to show relevant information for the picture only if a user wants it. It looks like this:



A lot of image galleries use that kind of showing additional information.
You can test it live here:

Demo: http://gruncharov.com/sneak/hover/

Best thing is, that no Javascript is required - it's only via CSS.

Here is the CSS:

Code: [Select]
.imgteaser {
margin: 0;
overflow: hidden;
position: relative;
}
.imgteaser a {
text-decoration: none;
}
.imgteaser a:hover {
text-decoration: none;
cursor: pointer;
}
.imgteaser a img {
margin: 0;
background: #fff;
}
.imgteaser a .desc { display: none; }
.imgteaser a:hover .desc{
display: block;
font-size: 10px;
background: #111;
filter:alpha(opacity=75);
opacity:.75;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=75)"; /*--IE 8 Transparency--*/
color: #fff;
position: absolute;
bottom: 0px;
padding: 10px;
margin: 0;
width: 180px;
border-top: 1px solid #999;
text-decoration: none;
}
.imgteaser a:hover .desc strong {
display: block;
margin-bottom: 5px;
font-size: 11px;
}


In order to work with div's, rather with tables my search.html looks not like this (just the part with the content):

Code: [Select]
<table width="960" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
<td align="left">
{if content} {content} {endif content}
</td>
</tr>
</table>

And the thubnail_bit.html (actually it's thumbnail_search_bit.html)

Code: [Select]
<div style="float: left; padding-right: 30px; padding-bottom: 30px;">
<div style="width: 200px; border: 1px solid #dddddd; padding: 1px;">
<div class="imgteaser">
<a href="details.php?image_id={image_id}&mode=search"><img src="data/thumbnails/{cat_id}/{thumbnail_file_name}">
<span class="desc">
<strong>{image_name}</strong>
by <b>{user_firstname} {user_lastname}</b><br /><br />
{image_comments} comments | {image_votes} votes |  {image_lightboxcount} likes 
</span>
</a>
</div>
</div>
</div>

And this is the block in my search.php to get rid of all the td's, tr's and so on (sorry I didn't commented them out, but you get the picture)

Code: [Select]
//-----------------------------------------------------
//--- Show Search Results -----------------------------
//-----------------------------------------------------
if ($num_rows_all && $show_result == 1)  {
  $link_arg = $site_sess->url(ROOT_PATH."search.php?show_result=1");

  include(ROOT_PATH.'includes/paging.php');
  $getpaging = new Paging($page, $perpage, $num_rows_all, $link_arg);
  $offset = $getpaging->get_offset();
  $site_template->register_vars(array(
    "paging" => $getpaging->get_paging(),
    "paging_stats" => $getpaging->get_paging_stats()
  ));

  $imgtable_width = ceil((intval($config['image_table_width'])) / $config['image_cells']);
  if ((substr($config['image_table_width'], -1)) == "%") {
    $imgtable_width .= "%";
  }

  $additional_sql = "";
  if (!empty($additional_image_fields)) {
    foreach ($additional_image_fields as $key => $val) {
      $additional_sql .= ", i.".$key;
    }
  }

  $sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.", "user_name").", u.user_lastname, u.user_firstname
          FROM (".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)
          LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
          WHERE i.image_active = 1
          $sql_where_query
          AND c.cat_id = i.cat_id $cat_id_sql
          ORDER BY ".$config['image_order']." ".$config['image_sort'].", image_id ".$config['image_sort']."
          LIMIT $offset, $perpage";
  $result = $site_db->query($sql);

  $count = 0;
  $bgcounter = 0;
  while ($image_row = $site_db->fetch_array($result)) {

    show_image($image_row, "search");
    $thumbnails .= $site_template->parse_template("thumbnail_bit_search");

    $count++;

  } // end while

 // $thumbnails .= "</table>\n";
  $content = $thumbnails;
  unset($thumbnails);
} // end if
else {
  $site_template->register_vars(array(
    "search_keywords" => format_text(stripslashes($org_search_keywords), 2),
    "search_user" => format_text(stripslashes($org_search_user), 2),
    "lang_search_by_keyword" => $lang['search_by_keyword'],
    "lang_search_by_username" => $lang['search_by_username'],
    "lang_new_images_only" => $lang['new_images_only'],
    "lang_search_terms" => $lang['search_terms'],
    "lang_or" => $lang['or'],
    "lang_and" => $lang['and'],
    "lang_category" => $lang['category'],
    "lang_search_fields" => $lang['search_fields'],
    "lang_all_fields" => $lang['all_fields'],
    "lang_name_only" => $lang['name_only'],
    "lang_description_only" => $lang['description_only'],
    "lang_keywords_only" => $lang['keywords_only'],
    "category_dropdown" => get_category_dropdown($cat_id)
  ));

  if (!empty($additional_image_fields)) {
    $additional_field_array = array();
    foreach ($additional_image_fields as $key => $val) {
      if (isset($lang[$key.'_only'])) {
        $additional_field_array['lang_'.$key.'_only'] = $lang[$key.'_only'];
      }
    }
    if (!empty($additional_field_array)) {
      $site_template->register_vars($additional_field_array);
    }
  }
  $content = $site_template->parse_template("search_form");
}







The whole code is optimized for a 960px template width and cropped 200x200px thumbnails, but you get the idea.









36
do you want to change the links (top images, new images, etc) or the yellow background?

37
Hey there,

I am currently developing a web 2.0 template from scratch, involving several mods with a 1.7.10 installation of 4images. I just started one week ago, just finishing the details page. My goal is to transform 4images in a modern, photography orientated (yeah and social) template (almost full AJAX) since the original template is somewhat outdated - and most people don't realize the power of 4images, so here I am ;)

I-phone / I-pad development is also on its way, and I will post those mod's for free.

I will post here every few days until the site is ready and you can see it in action. I am not willing to share the whole template, but I will share mods, design modifications etc. with you. I will also need some beta testers when the project I am doing goes online. This topic will also include codes to small javascript and AJAX modifications, that are easy but get that "wow" effect for your website.

Here's a little sneak preview of the details:














Stay tuned ;)




38
Mods & Plugins (Requests & Discussions) / Re: keyboard support
« on: October 14, 2011, 05:55:14 PM »
yeah, just put this in details.html , after {header}

Code: [Select]
<script type="text/javascript">
document.onkeyup = KeyCheck;       
function KeyCheck(e)
{
   var KeyID = (window.event) ? event.keyCode : e.keyCode;
   switch(KeyID)
   {
  case 37:
  window.location = "{prev_image_url}";
  break;

  case 39:
  window.location = "{next_image_url}";
  break;
   }    
}
</script>


39
Feedback & Suggestions / Re: Very good application !!!!!!
« on: October 14, 2011, 05:23:39 PM »
It's the best gallery platform currently available. If you know how to customize it, there is nothing better.

40
Discussion & Troubleshooting / Valid search string?
« on: October 13, 2011, 07:05:51 PM »
PS: Nevermind, found the solution:
http://www.4homepages.de/forum/index.php?topic=26287.0;msg=142916

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


Hey,

I added various additional image fields to my search, but I can't figure out the search string.

For example, I have a field "image_ISO" and want to search for images with an ISO of "100". I don't want to click on advanced search, but rather use a link in the images details page like this:

Quote
http://domain.com/4images/search.php?search_keywords=100

Well, that works, but shows me also images witch have for example "100" in their description.

So need something like this:

Quote
http://domain.com/4images/search.php?search_field=image_ISO&value=100

I know it's possible, I just need someone to give me the right string :)

Thanks

(I'm kinda need to refresh my 4images skills again)

41
With 1.7.10 the userpic isn't shown in the details page of an image - Comments are working, but using {userpic} in the details doesn't show anything.

To solve it take a look at that fix:

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

42
FIX

Problem: When i post a comment the userpic is broken, but when i refresh the page it's there.

If you are using this mod with the "Userpic MOD" and get a broken image after you submit your comment follow those steps:

open ajaxcomments.php

find
Code: [Select]
get_user_table_field(", u.", "user_icq")."
replace with
Code: [Select]
get_user_table_field(", u.", "user_icq")." ,u.userpic,

find
Code: [Select]
"comment_user_ip" => $comment_user_ip,
add below
Code: [Select]
"comment_userpic" => ($config['userpic'] && $comment_row[$i]['userpic']) ? ROOT_PATH."data/userpic/".$comment_row[$i]['userpic'] : "",

thats it - now you dont have a broken image ;)





43
Chit Chat / I'm back!
« on: October 10, 2011, 09:42:18 AM »
Hey guys,

some of the people who were here before 2007 probably know me and my mod's. So almost 5 years later I am currently working on a very big project using 4images. I am more or less transforming it into an Web 2.0 / Ajax / HTML5 platform with all social gimmicks, designs, and so on. I will release part of the MOD's as well as parts of the design. You won't recognize it as 4images when it's done :)

Whatever, nice to be at the forum again.

George (treZ)

44
Requests for paid modifications / Jobbörse / Re: Suche ändern
« on: November 17, 2007, 10:21:44 PM »
Juergen,

das ist zu machen, wir bieten diese Modifikation fuer 59.oo EUR an.
Bei Interesse einfach per Pm melden oder per Mail.

http://www.ggrec.com/mods

45
Ist dieses Angebot noch aktuell? Falls ja, haetten wir Interesse, Referencen senden wir gerne per Mail :)

Gruss

Georg

Pages: 1 2 [3] 4 5 6 7 ... 41