Author Topic: [Mod] Remind users to registrate  (Read 9112 times)

0 Members and 1 Guest are viewing this topic.

Offline x23piracy

  • Sr. Member
  • ****
  • Posts: 420
    • View Profile
    • FHG
[Mod] Remind users to registrate
« on: November 08, 2010, 03:14:44 AM »
Hi,

today i found that and want to share it with you:

DEMO: http://icons.josit.de/

  • it will be displayed to every non logged in user
  • it keeps position on scrolling
  • it can be closed by clicking the close button
  • it will be displayed again on every page reload
  • it will not be displayed if the user is logged in!



place this in your style.css:

Code: [Select]
#topbar{
position:absolute;
/*border: 3px dotted #ffffff;*/
padding: 10px;
        opacity: 0.85; /* Webkit und Opera  */
        -moz-opacity: 0.85; /* Mozilla Browser */
        filter: alpha(opacity = 85); /* IE */
background-color: #000000;
width: 400px;
visibility: hidden;
z-index: 999;
font-size: 10px;
/*border-color: #ffffff;*/
color: #996666;
        -moz-border-radius:10px;
        -khtml-border-radius:10px;
        border-radius: 5px;
        -webkit-border-radius: 5px;
}

place this in your ../template/header.html before </head> closing tag:

Code: [Select]
{if user_loggedout}
<!--www.143.ae mod -->
<script type="text/javascript">
var persistclose=0 //set to 0 or 1. 1 means once the bar is manually closed, it will remain closed for browser session
var startX = 30 //set x offset of bar in pixels
var startY = 30 //set y offset of bar in pixels
var verticalpos="fromtop" //enter "fromtop" or "frombottom"

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

function closebar(){
if (persistclose)
document.cookie="remainclosed=1"
document.getElementById("topbar").style.visibility="hidden"
}

function staticbar(){
barheight=document.getElementById("topbar").offsetHeight
var ns = (navigator.appName.indexOf("Netscape") != -1) || window.opera;
var d = document;
function ml(id){
var el=d.getElementById(id);
if (!persistclose || persistclose && get_cookie("remainclosed")=="")
el.style.visibility="visible"
if(d.layers)el.style=el;
el.sP=function(x,y){this.style.left=x+"px";this.style.top=y+"px";};
el.x = startX;
if (verticalpos=="fromtop")
el.y = startY;
else{
el.y = ns ? pageYOffset + innerHeight : iecompattest().scrollTop + iecompattest().clientHeight;
el.y -= startY;
}
return el;
}
window.stayTopLeft=function(){
if (verticalpos=="fromtop"){
var pY = ns ? pageYOffset : iecompattest().scrollTop;
ftlObj.y += (pY + startY - ftlObj.y)/8;
}
else{
var pY = ns ? pageYOffset + innerHeight - barheight: iecompattest().scrollTop + iecompattest().clientHeight - barheight;
ftlObj.y += (pY - startY - ftlObj.y)/8;
}
ftlObj.sP(ftlObj.x, ftlObj.y);
setTimeout("stayTopLeft()", 10);
}
ftlObj = ml("topbar");
stayTopLeft();
}

if (window.addEventListener)
window.addEventListener("load", staticbar, false)
else if (window.attachEvent)
window.attachEvent("onload", staticbar)
else if (document.getElementById)
window.onload=staticbar
</script>
<!-- End www.143.ae mod-->
{endif user_loggedout}


place this in any template file where you want to show the reminder:

Code: [Select]
{if user_loggedout}
<div id="topbar">
<table border="0" width="100%" cellspacing="0" cellpadding="0" id="table1">
<tr>
<td><img src="{template_url}/images/english.png" align="left" hspace="3" /></td>
<td>You are not registered user yet, you can't see the fullsized icons , you can't download them , to register click<a href="register.php"><font color="#FF0000"> here</font></a><br></td>
<td><a href="" onClick="closebar(); return false"><img src="{template_url}/images/close.png" border="0" align="right" /></a></td>
</tr>
<tr>
<td><img src="{template_url}/images/deutsch.png" align="left" hspace="3" /></td>
<td>Du bist ein nicht registierter Benutzer, du kannst die Icons nicht in voller Größe betrachten, der Download ist nicht möglich, um dich zu registrieren klicke<a href="register.php"><font color="#FF0000"> hier</font></a><br></td>
<td></td>
</tr>
<tr>
<td><img src="{template_url}/images/italian.png" align="left" hspace="3" /></td>
<td>Non siete ancora registrati , non potete vedere le foto delle ragazze, creare portfolio dell vostro locale e usare questo sito al 100%, per fare la registrazione clica<a href="register.php"><font color="#FF0000"> qui</font></a><br></td>
<td></td>
</tr>
</table>

</div>
{endif user_loggedout}



If you need a different position of the reminder you have to edit the following code:

Code: [Select]
var startX = 30 //set x offset of bar in pixels
var startY = 30 //set y offset of bar in pixels

If you don't want the opacity of the reminder or want a different setting, delete or edit the following in css code:

Code: [Select]
       opacity: 0.85; /* Webkit und Opera  */
        -moz-opacity: 0.85; /* Mozilla Browser */
        filter: alpha(opacity = 85); /* IE */

If you don't like rounded corners or want different corners, delete or edit:

Code: [Select]
       -moz-border-radius:10px;
        -khtml-border-radius:10px;
        border-radius: 10px;
        -webkit-border-radius: 10px;
*rounded borders are not working in ie8 with ie9 support is coming...

I don't explain the rest of the css...

In the attachment you will find used flags and the close button,
if you need others get them, upload them, link them ;)

This [Style] can may also been used to display advertisements
without wasting space on the site...



Greetz X23
« Last Edit: November 14, 2010, 10:49:38 AM by x23piracy »

Don't trust in md5 it's unsafe change your 4i galerys password hash algorythm! second pw db field, create new hashes over some time, deny old hash. Help members that cry, send informationen mail to the rest. Camouflage new pw hash in cookie. Done!

--(◔̯◔)--

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.808
  • I ♥ 4I
    • View Profile
Re: [Mod] Remind users to registrate
« Reply #1 on: November 08, 2010, 05:26:52 AM »
Code: [Select]
       opacity: 0.85; /* Webkit und Opera  */
        -moz-opacity: 0.85; /* Mozilla Browser */
*not working on ie


This is for IE
Code: [Select]
filter: alpha(opacity = 85);
So...

Code: [Select]
       opacity: 0.85; /* Webkit und Opera  */
        -moz-opacity: 0.85; /* Mozilla Browser */
filter: alpha(opacity = 85); /* IE */
*Working with IE

Code: [Select]
        -moz-border-radius:10px;
        -khtml-border-radius:10px;
*rounded borders are not working in ie8 with ie9 support is coming...

look hier: http://border-radius.com/

:D

Rembrandt

  • Guest
Re: [Mod] Remind users to registrate
« Reply #2 on: November 08, 2010, 07:57:37 AM »
html tags wie (div, tabe e.tc.) haben im head bereich aber nichts zu suchen  :wink:
das solltest du auf jedenfall noch ändern.

Offline x23piracy

  • Sr. Member
  • ****
  • Posts: 420
    • View Profile
    • FHG
Re: [Mod] Remind users to registrate
« Reply #3 on: November 08, 2010, 12:33:36 PM »
look hier: http://border-radius.com/

Hi Benny,

danke ich habe das oben eingepflegt.


html tags wie (div, tabe e.tc.) haben im head bereich aber nichts zu suchen  :wink:
das solltest du auf jedenfall noch ändern.

Hi Andi,

wie mache ich das genau?
Kann der ganze code aus dem <head> Bereich raus?
Oder muss ich den Code ändern?

Ich glaube ich könnte deine Hilfe gebrauchen.

Was muss ich machen um nicht den ganzen Code einsetzen zu müssen,
sondern zum Beispiel sowas wie {user_remember} zu realisieren?

Nochwas durch die ganzen MODS ist irgendwann meine Seite ziemlich lahm
geworden, gibt es eine Methode um festzustellen welches der scripte und oder
SQL selects so lange brauchen? (ohne das ich script für script entferne)
Sowas wie die Laufzeiten der einzelnen Parts?


EDIT:

Ich habe eine rounded corner Lösung für die IE gefunden, allerdings stimmt leider die
Positionierung des Reminders nicht, der Text und die Grafiken stimmen der Kasten
ansich aber bleibt fest oben links stehen und verschwindet auch nicht nach dem klick auf das X:



Zumindest sind die Ecken schonmal rund  :mrgreen:

Das hier in den CSS Code:

Code: [Select]
       behavior: url(border-radius.htc);
Im Anhang findet ihr die Datei, diese muss ins 4Images Root.

Wer kann helfen das htc file zu fixen damit es richtig funktioniert?


Gruß Jens
« Last Edit: November 08, 2010, 01:27:52 PM by x23piracy »

Don't trust in md5 it's unsafe change your 4i galerys password hash algorythm! second pw db field, create new hashes over some time, deny old hash. Help members that cry, send informationen mail to the rest. Camouflage new pw hash in cookie. Done!

--(◔̯◔)--

Rembrandt

  • Guest
Re: [Mod] Remind users to registrate
« Reply #4 on: November 08, 2010, 01:50:21 PM »

wie mache ich das genau?
Kann der ganze code aus dem <head> Bereich raus?
der div bereich auf jeden fall.

Quote
gibt es eine Methode um festzustellen welches der scripte und oder
SQL selects so lange brauchen? (ohne das ich script für script entferne)
Sowas wie die Laufzeiten der einzelnen Parts?

in der includes/constants.php

 define
("PRINT_STATS"1);
 
define("PRINT_QUERIES"1);

dann siehst du auf deiner seite ganz unten wieviele queries zeit e.t.c.

ein valider html code ist schon wichtig, es ist kann es dir sogar passieren das google und co dich ganz ignorieren.
deine webseite erreiche ich zeitweise überhaupt nicht, bis die aufgeht dauert es mehrere minuten!

noch etwas zu dem script, ich pers. besuche so eine webseite nur einmal, ich meine es nervt wenn permanent erst etwas wegklicken muß um die seite sehen zu können.

mfg Andi




Offline x23piracy

  • Sr. Member
  • ****
  • Posts: 420
    • View Profile
    • FHG
Re: [Mod] Remind users to registrate
« Reply #5 on: November 09, 2010, 12:23:27 AM »
in der includes/constants.php

 define
("PRINT_STATS"1);
 
define("PRINT_QUERIES"1);

dann siehst du auf deiner seite ganz unten wieviele queries zeit e.t.c.

Hi,

mit cache:
Code: [Select]
Page generated in 22.235408 seconds with 32 queries, spending 19.856000 seconds doing MySQL queries and 2.379408 doing PHP things. GZIP compression enabled
Code: [Select]
SELECT setting_name, setting_value FROM 4images_settings
Querytime: 0

SELECT cat_id, cat_name, cat_description, cat_parent_id, cat_hits, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment, cat_image FROM 4images_categories ORDER BY cat_order ASC
Querytime: 0

SELECT cat_id, COUNT(image_id) AS new_images FROM 4images_images WHERE image_active = 1 AND image_date >= 1288394379 GROUP BY cat_id
Querytime: 0.391

SELECT cat_id, COUNT(*) AS num_images FROM 4images_images WHERE image_active = 1 GROUP BY cat_id
Querytime: 0

DELETE FROM 4images_sessions WHERE session_lastaction < 1289257479
Querytime: 0

REPLACE INTO 4images_sessions (session_id, session_user_id, session_lastaction, session_location, session_ip) VALUES ('d1b01aac30df0e8b9407baae6d6a3942', -1, 1289258379, 'index2.php', '193.158.174.192')
Querytime: 0

SELECT s.session_user_id, s.session_lastaction, s.session_ip, u.user_id, u.user_level, u.user_name, u.user_invisible FROM 4images_sessions s LEFT JOIN 4images_users u ON (u.user_id = s.session_user_id) WHERE s.session_lastaction >= 1289258079 ORDER BY u.user_id ASC, s.session_ip ASC
Querytime: 0.001

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, c.cat_name, u.user_name FROM (4images_images i, 4images_categories c) LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (0, 1, 16, 14, 2, 9, 18, 4, 6, 55, 7, 45, 34, 31, 36, 56, 46, 17, 49, 26, 42, 3, 33, 29, 44, 28, 51, 59, 13, 12, 48, 52, 57, 53, 58, 50, 43, 47, 41, 27) ORDER BY i.image_rating DESC, i.image_votes DESC
Querytime: 1.758

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, c.cat_name, u.user_name FROM (4images_images i, 4images_categories c) LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (0, 1, 16, 14, 2, 9, 18, 4, 6, 55, 7, 45, 34, 31, 36, 56, 46, 17, 49, 26, 42, 3, 33, 29, 44, 28, 51, 59, 13, 12, 48, 52, 57, 53, 58, 50, 43, 47, 41, 27) ORDER BY i.image_votes DESC, i.image_rating DESC
Querytime: 1.769

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, c.cat_name, u.user_name FROM (4images_images i, 4images_categories c) LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (0, 1, 16, 14, 2, 9, 18, 4, 6, 55, 7, 45, 34, 31, 36, 56, 46, 17, 49, 26, 42, 3, 33, 29, 44, 28, 51, 59, 13, 12, 48, 52, 57, 53, 58, 50, 43, 47, 41, 27) ORDER BY i.image_hits DESC, i.image_name ASC
Querytime: 3.347

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, c.cat_name, u.user_name FROM (4images_images i, 4images_categories c) LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (0, 1, 16, 14, 2, 9, 18, 4, 6, 55, 7, 45, 34, 31, 36, 56, 46, 17, 49, 26, 42, 3, 33, 29, 44, 28, 51, 59, 13, 12, 48, 52, 57, 53, 58, 50, 43, 47, 41, 27) ORDER BY i.image_comments DESC, i.image_name ASC
Querytime: 6.075

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, c.cat_name, u.user_name FROM (4images_images i, 4images_categories c) LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (0, 1, 16, 14, 2, 9, 18, 4, 6, 55, 7, 45, 34, 31, 36, 56, 46, 17, 49, 26, 42, 3, 33, 29, 44, 28, 51, 59, 13, 12, 48, 52, 57, 53, 58, 50, 43, 47, 41, 27) ORDER BY i.image_downloads DESC, i.image_name ASC
Querytime: 3.417

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, c.cat_name, u.user_name FROM (4images_images i, 4images_categories c) LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND i.cat_id NOT IN (0, 60) AND c.cat_id = i.cat_id LIMIT 2088, 1
Querytime: 0.093

SELECT i.word_id, i.word_text, COUNT(c.word_id) AS quantity FROM 4images_wordlist i LEFT JOIN 4images_wordmatch c ON i.word_id = c.word_id WHERE name_match > 0 GROUP BY i.word_text ORDER BY RAND() LIMIT 50
Querytime: 1.131

SELECT COUNT(i.image_id) AS user_t_images, u.user_name, u.user_id FROM 4images_users u LEFT JOIN 4images_images i ON (i.user_id = u.user_id) WHERE u.user_level = 2 GROUP BY u.user_id ORDER BY user_t_images DESC LIMIT 5
Querytime: 0.001

SELECT image_id, image_media_file, image_thumb_file, cat_id FROM 4images_images WHERE image_id = 6805
Querytime: 0

SELECT image_id, image_media_file, image_thumb_file, cat_id FROM 4images_images WHERE image_id = 6677
Querytime: 0

SELECT image_id, image_media_file, image_thumb_file, cat_id FROM 4images_images WHERE image_id = 7735
Querytime: 0

SELECT image_id, image_media_file, image_thumb_file, cat_id FROM 4images_images WHERE image_id = 6041
Querytime: 0

SELECT image_id, image_media_file, image_thumb_file, cat_id FROM 4images_images WHERE image_id = 17189
Querytime: 0

SELECT image_id, image_media_file, image_thumb_file, cat_id FROM 4images_images WHERE image_id = 9723
Querytime: 0

SELECT image_id, image_media_file, image_thumb_file, cat_id FROM 4images_images WHERE image_id = 6805
Querytime: 0

SELECT image_id, image_media_file, image_thumb_file, cat_id FROM 4images_images WHERE image_id = 6677
Querytime: 0

SELECT image_id, image_media_file, image_thumb_file, cat_id FROM 4images_images WHERE image_id = 7735
Querytime: 0

SELECT image_id, image_media_file, image_thumb_file, cat_id FROM 4images_images WHERE image_id = 6041
Querytime: 0

SELECT image_id, image_media_file, image_thumb_file, cat_id FROM 4images_images WHERE image_id = 17189
Querytime: 0

SELECT image_id, image_media_file, image_thumb_file, cat_id FROM 4images_images WHERE image_id = 9723
Querytime: 0

SELECT COUNT(image_id) as num FROM 4images_images WHERE image_active = 1 AND cat_id NOT IN (0, 60)
Querytime: 0.329

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, i.image_md5, c.cat_name, u.user_name FROM (4images_images i, 4images_categories c) LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id NOT IN (0, 60) ORDER BY i.image_date DESC LIMIT 0, 4
Querytime: 0.804

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, i.image_md5, c.cat_name, u.user_name FROM (4images_images i, 4images_categories c) LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (34) ORDER BY i.image_date DESC LIMIT 3
Querytime: 0.001

SELECT c.image_id, c.comment_id, c.user_id as comment_user_id, c.user_name as guest_user_name, c.comment_headline, c.comment_text, c.comment_date, i.cat_id, i.user_id, i.image_name, i.image_media_file, i.image_thumb_file, u.user_name as user_name, s.user_name as comment_user_name , i.image_md5, s.user_msn as comment_user_msn, u.user_msn as image_user_user_msn, s.user_aim as comment_user_aim, u.user_aim as image_user_user_aim, s.mod_auszeichnungen as comment_mod_auszeichnungen, u.mod_auszeichnungen as image_user_mod_auszeichnungen, s.user_azms as comment_user_azms, u.user_azms as image_user_user_azms, s.user_azms_info as comment_user_azms_info, u.user_azms_info as image_user_user_azms_info, s.user_azmg as comment_user_azmg, u.user_azmg as image_user_user_azmg, s.user_azmg_info as comment_user_azmg_info, u.user_azmg_info as image_user_user_azmg_info, s.user_azmp as comment_user_azmp, u.user_azmp as image_user_user_azmp, s.user_azmp_info as comment_user_azmp_info, u.user_azmp_info as image_user_user_azmp_info, s.user_azmn as comment_user_azmn, u.user_azmn as image_user_user_azmn, s.user_azmn_info as comment_user_azmn_info, u.user_azmn_info as image_user_user_azmn_info, s.user_azma as comment_user_azma, u.user_azma as image_user_user_azma, s.user_azma_info as comment_user_azma_info, u.user_azma_info as image_user_user_azma_info, s.user_azmm as comment_user_azmm, u.user_azmm as image_user_user_azmm, s.user_azmm_info as comment_user_azmm_info, u.user_azmm_info as image_user_user_azmm_info FROM 4images_comments c LEFT JOIN 4images_images i ON i.image_id = c.image_id LEFT JOIN 4images_users u ON u.user_id = i.user_id LEFT JOIN 4images_users s ON s.user_id = c.user_id WHERE i.image_active = 1 AND i.image_allow_comments = 1 AND i.cat_id NOT IN (0) AND i.cat_id NOT IN (0, 60) AND i.cat_id NOT IN (0, 60) ORDER BY c.comment_date DESC LIMIT 7
Querytime: 0.001

SELECT image_id, cat_id, user_id, image_name, image_description, image_keywords, image_date, image_active, image_media_file, image_thumb_file, image_download_url, image_allow_comments, image_comments, image_downloads, image_votes, image_rating, image_hits FROM 4images_images WHERE image_active = 1 AND cat_id NOT IN (0, 60) AND image_media_file LIKE '%.jpg' ORDER BY RAND() LIMIT 1
Querytime: 0.738

ohne cache:
Code: [Select]
Page generated in 52.490433 seconds with 32 queries, spending 47.944000 seconds doing MySQL queries and 4.546433 doing PHP things. GZIP compression enabled
Code: [Select]
SELECT setting_name, setting_value FROM 4images_settings
Querytime: 0

SELECT cat_id, cat_name, cat_description, cat_parent_id, cat_hits, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment, cat_image FROM 4images_categories ORDER BY cat_order ASC
Querytime: 0

SELECT cat_id, COUNT(image_id) AS new_images FROM 4images_images WHERE image_active = 1 AND image_date >= 1288394913 GROUP BY cat_id
Querytime: 0.962

SELECT cat_id, COUNT(*) AS num_images FROM 4images_images WHERE image_active = 1 GROUP BY cat_id
Querytime: 0

REPLACE INTO 4images_sessions (session_id, session_user_id, session_lastaction, session_location, session_ip) VALUES ('d1b01aac30df0e8b9407baae6d6a3942', -1, 1289258914, 'index2.php', '193.158.174.192')
Querytime: 0

DELETE FROM 4images_sessions WHERE session_lastaction < 1289258014
Querytime: 0

SELECT s.session_user_id, s.session_lastaction, s.session_ip, u.user_id, u.user_level, u.user_name, u.user_invisible FROM 4images_sessions s LEFT JOIN 4images_users u ON (u.user_id = s.session_user_id) WHERE s.session_lastaction >= 1289258614 ORDER BY u.user_id ASC, s.session_ip ASC
Querytime: 0.001

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, c.cat_name, u.user_name FROM (4images_images i, 4images_categories c) LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (0, 1, 16, 14, 2, 9, 18, 4, 6, 55, 7, 45, 34, 31, 36, 56, 46, 17, 49, 26, 42, 3, 33, 29, 44, 28, 51, 59, 13, 12, 48, 52, 57, 53, 58, 50, 43, 47, 41, 27) ORDER BY i.image_rating DESC, i.image_votes DESC
Querytime: 4.594

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, c.cat_name, u.user_name FROM (4images_images i, 4images_categories c) LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (0, 1, 16, 14, 2, 9, 18, 4, 6, 55, 7, 45, 34, 31, 36, 56, 46, 17, 49, 26, 42, 3, 33, 29, 44, 28, 51, 59, 13, 12, 48, 52, 57, 53, 58, 50, 43, 47, 41, 27) ORDER BY i.image_votes DESC, i.image_rating DESC
Querytime: 4.644

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, c.cat_name, u.user_name FROM (4images_images i, 4images_categories c) LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (0, 1, 16, 14, 2, 9, 18, 4, 6, 55, 7, 45, 34, 31, 36, 56, 46, 17, 49, 26, 42, 3, 33, 29, 44, 28, 51, 59, 13, 12, 48, 52, 57, 53, 58, 50, 43, 47, 41, 27) ORDER BY i.image_hits DESC, i.image_name ASC
Querytime: 8.286

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, c.cat_name, u.user_name FROM (4images_images i, 4images_categories c) LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (0, 1, 16, 14, 2, 9, 18, 4, 6, 55, 7, 45, 34, 31, 36, 56, 46, 17, 49, 26, 42, 3, 33, 29, 44, 28, 51, 59, 13, 12, 48, 52, 57, 53, 58, 50, 43, 47, 41, 27) ORDER BY i.image_comments DESC, i.image_name ASC
Querytime: 8.714

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, c.cat_name, u.user_name FROM (4images_images i, 4images_categories c) LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (0, 1, 16, 14, 2, 9, 18, 4, 6, 55, 7, 45, 34, 31, 36, 56, 46, 17, 49, 26, 42, 3, 33, 29, 44, 28, 51, 59, 13, 12, 48, 52, 57, 53, 58, 50, 43, 47, 41, 27) ORDER BY i.image_downloads DESC, i.image_name ASC
Querytime: 9.832

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, c.cat_name, u.user_name FROM (4images_images i, 4images_categories c) LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND i.cat_id NOT IN (0, 60) AND c.cat_id = i.cat_id LIMIT 21257, 1
Querytime: 3.826

SELECT i.word_id, i.word_text, COUNT(c.word_id) AS quantity FROM 4images_wordlist i LEFT JOIN 4images_wordmatch c ON i.word_id = c.word_id WHERE name_match > 0 GROUP BY i.word_text ORDER BY RAND() LIMIT 50
Querytime: 2.967

SELECT COUNT(i.image_id) AS user_t_images, u.user_name, u.user_id FROM 4images_users u LEFT JOIN 4images_images i ON (i.user_id = u.user_id) WHERE u.user_level = 2 GROUP BY u.user_id ORDER BY user_t_images DESC LIMIT 5
Querytime: 0.001

SELECT image_id, image_media_file, image_thumb_file, cat_id FROM 4images_images WHERE image_id = 6805
Querytime: 0

SELECT image_id, image_media_file, image_thumb_file, cat_id FROM 4images_images WHERE image_id = 6677
Querytime: 0

SELECT image_id, image_media_file, image_thumb_file, cat_id FROM 4images_images WHERE image_id = 7735
Querytime: 0

SELECT image_id, image_media_file, image_thumb_file, cat_id FROM 4images_images WHERE image_id = 6041
Querytime: 0

SELECT image_id, image_media_file, image_thumb_file, cat_id FROM 4images_images WHERE image_id = 17189
Querytime: 0

SELECT image_id, image_media_file, image_thumb_file, cat_id FROM 4images_images WHERE image_id = 9723
Querytime: 0

SELECT image_id, image_media_file, image_thumb_file, cat_id FROM 4images_images WHERE image_id = 6805
Querytime: 0

SELECT image_id, image_media_file, image_thumb_file, cat_id FROM 4images_images WHERE image_id = 6677
Querytime: 0

SELECT image_id, image_media_file, image_thumb_file, cat_id FROM 4images_images WHERE image_id = 7735
Querytime: 0

SELECT image_id, image_media_file, image_thumb_file, cat_id FROM 4images_images WHERE image_id = 6041
Querytime: 0

SELECT image_id, image_media_file, image_thumb_file, cat_id FROM 4images_images WHERE image_id = 17189
Querytime: 0

SELECT image_id, image_media_file, image_thumb_file, cat_id FROM 4images_images WHERE image_id = 9723
Querytime: 0

SELECT COUNT(image_id) as num FROM 4images_images WHERE image_active = 1 AND cat_id NOT IN (0, 60)
Querytime: 0

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, i.image_md5, c.cat_name, u.user_name FROM (4images_images i, 4images_categories c) LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id NOT IN (0, 60) ORDER BY i.image_date DESC LIMIT 0, 4
Querytime: 0

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, i.image_md5, c.cat_name, u.user_name FROM (4images_images i, 4images_categories c) LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (34) ORDER BY i.image_date DESC LIMIT 3
Querytime: 0.144

SELECT c.image_id, c.comment_id, c.user_id as comment_user_id, c.user_name as guest_user_name, c.comment_headline, c.comment_text, c.comment_date, i.cat_id, i.user_id, i.image_name, i.image_media_file, i.image_thumb_file, u.user_name as user_name, s.user_name as comment_user_name , i.image_md5, s.user_msn as comment_user_msn, u.user_msn as image_user_user_msn, s.user_aim as comment_user_aim, u.user_aim as image_user_user_aim, s.mod_auszeichnungen as comment_mod_auszeichnungen, u.mod_auszeichnungen as image_user_mod_auszeichnungen, s.user_azms as comment_user_azms, u.user_azms as image_user_user_azms, s.user_azms_info as comment_user_azms_info, u.user_azms_info as image_user_user_azms_info, s.user_azmg as comment_user_azmg, u.user_azmg as image_user_user_azmg, s.user_azmg_info as comment_user_azmg_info, u.user_azmg_info as image_user_user_azmg_info, s.user_azmp as comment_user_azmp, u.user_azmp as image_user_user_azmp, s.user_azmp_info as comment_user_azmp_info, u.user_azmp_info as image_user_user_azmp_info, s.user_azmn as comment_user_azmn, u.user_azmn as image_user_user_azmn, s.user_azmn_info as comment_user_azmn_info, u.user_azmn_info as image_user_user_azmn_info, s.user_azma as comment_user_azma, u.user_azma as image_user_user_azma, s.user_azma_info as comment_user_azma_info, u.user_azma_info as image_user_user_azma_info, s.user_azmm as comment_user_azmm, u.user_azmm as image_user_user_azmm, s.user_azmm_info as comment_user_azmm_info, u.user_azmm_info as image_user_user_azmm_info FROM 4images_comments c LEFT JOIN 4images_images i ON i.image_id = c.image_id LEFT JOIN 4images_users u ON u.user_id = i.user_id LEFT JOIN 4images_users s ON s.user_id = c.user_id WHERE i.image_active = 1 AND i.image_allow_comments = 1 AND i.cat_id NOT IN (0) AND i.cat_id NOT IN (0, 60) AND i.cat_id NOT IN (0, 60) ORDER BY c.comment_date DESC LIMIT 7
Querytime: 0.001

SELECT image_id, cat_id, user_id, image_name, image_description, image_keywords, image_date, image_active, image_media_file, image_thumb_file, image_download_url, image_allow_comments, image_comments, image_downloads, image_votes, image_rating, image_hits FROM 4images_images WHERE image_active = 1 AND cat_id NOT IN (0, 60) AND image_media_file LIKE '%.jpg' ORDER BY RAND() LIMIT 1
Querytime: 3.972

Verdammt wie grausam... mit 5 Sekunden gesamt könnte ich ja leben... ohje wie geh ich da vor?

Ich kann erkennen das MOD Mini Top sehr viel Zeit frisst, eigentlich die meiste...

Code: [Select]
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, c.cat_name, u.user_name FROM (4images_images i, 4images_categories c) LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (0, 1, 16, 14, 2, 9, 18, 4, 6, 55, 7, 45, 34, 31, 36, 56, 46, 17, 49, 26, 42, 3, 33, 29, 44, 28, 51, 59, 13, 12, 48, 52, 57, 53, 58, 50, 43, 47, 41, 27) ORDER BY i.image_rating DESC, i.image_votes DESC
Querytime: 4.594

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, c.cat_name, u.user_name FROM (4images_images i, 4images_categories c) LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (0, 1, 16, 14, 2, 9, 18, 4, 6, 55, 7, 45, 34, 31, 36, 56, 46, 17, 49, 26, 42, 3, 33, 29, 44, 28, 51, 59, 13, 12, 48, 52, 57, 53, 58, 50, 43, 47, 41, 27) ORDER BY i.image_votes DESC, i.image_rating DESC
Querytime: 4.644

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, c.cat_name, u.user_name FROM (4images_images i, 4images_categories c) LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (0, 1, 16, 14, 2, 9, 18, 4, 6, 55, 7, 45, 34, 31, 36, 56, 46, 17, 49, 26, 42, 3, 33, 29, 44, 28, 51, 59, 13, 12, 48, 52, 57, 53, 58, 50, 43, 47, 41, 27) ORDER BY i.image_hits DESC, i.image_name ASC
Querytime: 8.286

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, c.cat_name, u.user_name FROM (4images_images i, 4images_categories c) LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (0, 1, 16, 14, 2, 9, 18, 4, 6, 55, 7, 45, 34, 31, 36, 56, 46, 17, 49, 26, 42, 3, 33, 29, 44, 28, 51, 59, 13, 12, 48, 52, 57, 53, 58, 50, 43, 47, 41, 27) ORDER BY i.image_comments DESC, i.image_name ASC
Querytime: 8.714

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, c.cat_name, u.user_name FROM (4images_images i, 4images_categories c) LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (0, 1, 16, 14, 2, 9, 18, 4, 6, 55, 7, 45, 34, 31, 36, 56, 46, 17, 49, 26, 42, 3, 33, 29, 44, 28, 51, 59, 13, 12, 48, 52, 57, 53, 58, 50, 43, 47, 41, 27) ORDER BY i.image_downloads DESC, i.image_name ASC
Querytime: 9.832

Wohl nix für die Index oder nur was für Server mit richtig dampf?
Das Teil macht bei mir 36 Sekunden aus...

Evtl. sind das auch einfach zu viele Bilder in der db aktuell ~27.000?!


EDIT:

Ich habe oben nochmal den Code editiert, wenn ich das richtig verstehe belasse ich das if_user_loggedout
im header beim script, dass dürfte doch den Vorteil haben das, dass Script bei eingeloggten usern erst
garnicht durchlaufen wird? Bei dem div dürfte das ja egal sein da es sowieso definiert werden muss oder
gilt hier das gleiche?

Ich hab es erstmal in beide Bereiche eingebaut script und div, durch die Änderung im ersten Post kann man
das Teil jetzt gezielter in bestimmten Template Seiten einbauen... allerdings fände ich es besser wenn man
nicht den ganzen div pasten müsste sondern {user_remember} wie realisiere ich das?


EDIT2:

Ich habe MOD Mini Top mal den Arschtritt verpasst und siehe da:
(Da ist doch der Code Scheisse oder ich hab zuviele Bilder... wohl eher letzteres)

mit cache:
Code: [Select]
Page generated in 2.206502 seconds with 14 queries, spending 1.789000 seconds doing MySQL queries and 0.417502 doing PHP things. GZIP compression enabled
ohne cache:
Code: [Select]
Page generated in 5.344027 seconds with 25 queries, spending 2.989000 seconds doing MySQL queries and 2.355027 doing PHP things. GZIP compression enabled
Danke Andi für deine Hilfe  :thumbup:


Zurück zu meinem MOD:

Kann ich irgendwie eine Art Counter in das User Cookie speichern?
Damit ich auch bei nicht registrierten Usern den Reminder max X mal
anzeigen lassen kann?

Wie kann ich das Cookie ansprechen?


Gruß Jens
« Last Edit: November 09, 2010, 01:42:14 AM by x23piracy »

Don't trust in md5 it's unsafe change your 4i galerys password hash algorythm! second pw db field, create new hashes over some time, deny old hash. Help members that cry, send informationen mail to the rest. Camouflage new pw hash in cookie. Done!

--(◔̯◔)--

Rembrandt

  • Guest
Re: [Mod] Remind users to registrate
« Reply #6 on: November 09, 2010, 05:30:57 AM »
Quote
Page generated in 22.235408 seconds with 32 queries,
*lol* das ist der hammer, bitte was für müll hast du da drinnen?
auf der startseite solltest du ~ 10-15 querys haben, wobei 15 schon viel sind.

Quote
sondern {user_remember} wie realisiere ich das
schau dir doch mal die ganzen modifikationen an, wo sowas eingesetzt wird.

ich habe mir deine startseite nochmal angesehn, da wird doch nichts angezeigt was aktuell 27 querys rechtfertigt, da stimmt doch was nicht?

 

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.808
  • I ♥ 4I
    • View Profile
Re: [Mod] Remind users to registrate
« Reply #7 on: November 09, 2010, 12:39:44 PM »
Zu den Rounded Borders. Es gibt eine einfache Lösung für den IE, ich habe mir da etwas selber zusammengestellt. Bin jetzt noch auf der Arbeit, aber wenn ich zuhause bin und Zeit finde gebe ich dir den Code dafür!

Offline x23piracy

  • Sr. Member
  • ****
  • Posts: 420
    • View Profile
    • FHG
Re: [Mod] Remind users to registrate
« Reply #8 on: November 09, 2010, 01:11:16 PM »
*lol* das ist der hammer, bitte was für müll hast du da drinnen?
auf der startseite solltest du ~ 10-15 querys haben, wobei 15 schon viel sind.

Hi,

das sind keine 27 Querys ;) wann hast du das letzte mal geguckt?

Es sind genau 15 Querys wovon 6 die Category Bilder ausmachen
deren Laufzeit = Null geht...

Hmm irgendwie immer noch lang so zwischen 5-9 Sekunden
ich werde das MOD Tag Cloud auch noch entfernen die 50
Items zu ermitteln kostet auch 3 Sekunden...

@Benny das wäre toll wenn ich deinen funktionierenden Code haben kann.
Danke im vorraus.


Gruß Jens

Don't trust in md5 it's unsafe change your 4i galerys password hash algorythm! second pw db field, create new hashes over some time, deny old hash. Help members that cry, send informationen mail to the rest. Camouflage new pw hash in cookie. Done!

--(◔̯◔)--

Rembrandt

  • Guest
Re: [Mod] Remind users to registrate
« Reply #9 on: November 09, 2010, 01:48:03 PM »
...
das sind keine 27 Querys ;) wann hast du das letzte mal geguckt?

schau auf die uhrzeit bei meinen post

und wenn man jetzt auf die seite schau, ist es auch nicht besser:
Quote
Page generated in 6.074219 seconds with 27 queries, spending 3.825000 seconds doing MySQL queries and 2.249219 doing PHP things. GZIP compression enabled
nach session start sind es:
Quote
16 queries

und das passiert wenn man auf ein bild klickt:
Quote
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.
Apache/2.2.9 (Debian) mod_ssl/2.2.9 OpenSSL/0.9.8g Server at icons.josit.de Port 80

schau, mir ist es eh egal ich möchte dich nur darauf hinweisen.