Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Baze

Members
  • Joined

  • Last visited

Everything posted by Baze

  1. Hi guys, on my site i have script which alters the default encoding (typing) for the users. It shows small box saying EN as default language and if anyone clicks on it, it turns into MK and whatever the user types on the site (forum) it cames up with cyrillic (Macedonian) alphabet. What i want to do is to reverse it, actually to set MK as the default state of the button, and when someone clicks on it to turn into EN. I've tried with changing kirilicaOn == 0 values into 1 and kirilicaOn =1 into 0 but it only changed the aperiance (the text typed by default was latin) here is the code inside the html: <script charset="utf-8" defer="defer" src="/kirilica/kirTast.js" type="text/javascript"></script><input id="commentBut" type="button" onclick="onKir(); this.blur(); if (inputField) inputField.focus();" value="EN" style="background-color: #4a5671; color: white; font-weight: bold; border: 1px solid black; font-size: 10px; width: 25px; margin-top: 0px; margin-left:0px;" title="Web keyboard: Click or press [2x Shift] for change" /> (МК - cyrillic, EN - latin) and here is the script itself: // // var blnDOM = false, blnIE4 = false; if (navigator.userAgent.toLowerCase().indexOf("opera") + 1) blnDOM = true; else if (navigator.userAgent.toLowerCase().indexOf("msie") + 1) blnIE4 = true; else if (document.getElementById) blnDOM = true; var kirilicaOn = 0; var shiftK = 0; var inputField; document.onkeypress = getKeycode; document.onkeyup = shiftKey; addMyLoadEvent(inputs); function addMyLoadEvent(myfunc) { var myoldonload = window.onload; if (typeof window.onload != 'function') { window.onload = myfunc; } else { window.onload = function() { myoldonload(); myfunc(); } } } function onKir() { if(kirilicaOn == 0) { kirilicaOn =1; document.getElementById("commentBut").value = 'MK'; document.getElementById("commentBut").style.backgroundColor = 'red'; } else { kirilicaOn =0; document.getElementById("commentBut").value = 'EN'; document.getElementById("commentBut").style.backgroundColor = '#4a5671'; } } function shiftKey(event) { if (blnDOM) { if(event.which == 16) { shiftK++; setTimeout("shiftK=0", 300); if(shiftK == 2) { onKir(); shiftK = 0; } } else { shiftK = 0; } } else if(blnIE4) { if(window.event.keyCode == 16) { shiftK++; setTimeout("shiftK=0", 300); if(shiftK == 2) { onKir(); shiftK=0; } } else { shiftK = 0; } } } function getKeycode(e) { if (blnIE4 && kirilicaOn == 1 && !event.ctrlKey) { var sRep = cyr5ko_tast(event.keyCode, event.shiftKey); if(sRep) window.event.keyCode = sRep.charCodeAt(); } else if (blnDOM && kirilicaOn == 1 && !e.ctrlKey) { var charBukva = new String(e.which); var blnkey = (e.shiftKey) ? cyr5ko_tast(charBukva, 1) : cyr5ko_tast(charBukva, 0); if (blnkey) { textArea(blnkey); return false; } } } function install( hElement ) { if (hElement.addEventListener) { hElement.addEventListener( "focus", function() {inputField = hElement;}, false ); } else if (hElement.attachEvent) { hElement.attachEvent("onfocus", function() {inputField = hElement;}); } } function inputs() { var aInputs = document.getElementsByTagName( 'INPUT' ); for( var nI = 0; nI < aInputs.length; nI++ ) { if( aInputs[ nI ].type.toLowerCase() == 'text' || aInputs[ nI ].type.toLowerCase() == 'password') { install( aInputs[ nI ] ); } } var aTextAreas = document.getElementsByTagName( 'TEXTAREA' ); for( var nI = 0; nI < aTextAreas.length; nI++ ) { install( aTextAreas[ nI ] ); } } var i1 = 0; var AZBk = new Array(); AZBk[i1++] = new Array("џ", "Џ", "120", "88"); AZBk[i1++] = new Array("ќ", "Ќ", "39", "34"); AZBk[i1++] = new Array("љ", "Љ", "113", "81"); AZBk[i1++] = new Array("њ", "Њ", "119", "87"); AZBk[i1++] = new Array("ѕ", "Ѕ", "121", "89"); AZBk[i1++] = new Array("ж", "Ж", "92", "124"); AZBk[i1++] = new Array("а", "А", "97", "65"); AZBk[i1++] = new Array("б", "Б", "98", "66"); AZBk[i1++] = new Array("в", "В", "118", "86"); AZBk[i1++] = new Array("г", "Г", "103", "71"); AZBk[i1++] = new Array("д", "Д", "100", "68"); AZBk[i1++] = new Array("е", "Е", "101", "69"); AZBk[i1++] = new Array("з", "З", "122", "90"); AZBk[i1++] = new Array("и", "И", "105", "73"); AZBk[i1++] = new Array("ј", "Ј", "106", "74"); AZBk[i1++] = new Array("к", "К", "107", "75"); AZBk[i1++] = new Array("л", "Л", "108", "76"); AZBk[i1++] = new Array("м", "М", "109", "77"); AZBk[i1++] = new Array("н", "Н", "110", "78"); AZBk[i1++] = new Array("о", "О", "111", "79"); AZBk[i1++] = new Array("п", "П", "112", "80"); AZBk[i1++] = new Array("р", "Р", "114", "82"); AZBk[i1++] = new Array("с", "С", "115", "83"); AZBk[i1++] = new Array("т", "Т", "116", "84"); AZBk[i1++] = new Array("у", "У", "117", "85"); AZBk[i1++] = new Array("ф", "Ф", "102", "70"); AZBk[i1++] = new Array("х", "Х", "104", "72"); AZBk[i1++] = new Array("ц", "Ц", "99", "67"); AZBk[i1++] = new Array("ч", "Ч", "59", "58"); AZBk[i1++] = new Array("ш", "Ш", "91", "123"); AZBk[i1++] = new Array("ѓ", "Ѓ", "93", "125"); AZBk[i1++] = new Array("ш", "Ш", "353", "352"); AZBk[i1++] = new Array("џ", "Џ", "273", "272"); AZBk[i1++] = new Array("ч", "Ч", "269", "268"); AZBk[i1++] = new Array("ќ", "Ќ", "263", "262"); AZBk[i1++] = new Array("ж", "Ж", "382", "381"); AZBk[i1++] = new Array(".", ":", "46", "62"); AZBk[i1++] = new Array(",", ";", "44", "60"); AZBk[i1++] = new Array("2", "„", "50", "64"); AZBk[i1++] = new Array("3", "“", "51", "35"); AZBk[i1++] = new Array("4", "’", "52", "36"); AZBk[i1++] = new Array("6", "‘", "54", "94"); function cyr5ko_tast(kod, golemina) { for(var i=0; i<AZBk.length; i++) { if(golemina) { toG = AZBk[i][1]; fromG = AZBk[i][3]; if (kod == fromG) return toG; } else { to = AZBk[i][0]; from = AZBk[i][2]; if (kod == from) return to; } } return false; } function textArea(intext) { var txtarea = inputField; var text = new String(txtarea.value); var text1 = text.slice(0,txtarea.selectionStart); var text3 = text.slice(txtarea.selectionStart, text.length); txtarea.value = text1 + intext + text3; txtarea.selectionStart = text1.length+1; txtarea.selectionEnd = text1.length+1; } ;
  2. Arround 5-600 uniques a day, and both the statistics and the sef urls are disabled so that's not the issue. I got the limit increased to 120000 but the site went off couple of minutes ago :S is there any way i can find out which component is generating the queries using phpmyadmin? btw i've enabled the debugging on the site and it showed 1142 queries executed on the main page :S, which i've managed to lower to 720 but again, it's too much :S
  3. Hi all, on one of my sites i'm getting this error quite frequently. The error it self means that the site sends more than 100000 requests to the database per hour (that's the limit on the hosting plan), which is quite a lot for a joomla site without SEF or statistic component. Anyway, solution for this is to assign more users to the database with all privileges and to configure the joomla to use multiple users for it, but the problem is that the host allows only one user per database. So that's not an option for me.. One thing i've noticed is that when i get the error (even if it's after 20 minutes), all i have to do is to login to the back-end on the host, JUST change the password for the database to anything, then return it to the one configured in the joomla config file, and the site is up and running normally in seconds. The problem with this is that i can't stay 24/7 online and change the password of the database.. :S Any idea how can i sort this out?
  4. I've started posting to the other forums first instead of introducing my self so i'd like to sort it out..and do it the proper way My name is Baze, i work with computers since i was 10, it was back in '94, and I'm webdesigner for...well my first public site was in '97, but i've started working professionally several years later. Currently i work as web administrator for a local company here in Macedonia, and i run couple of my own sites. Besides the computers i love motorcycles, cheers to all bikers here...if any so much for now...i think it's enough
  5. here is the demo page, login as guest and check the second room, it's a showcase for video/audio... cheers
  6. I've used many chats on my websites, and from my experience 123flashchat is the best solution, if you can afford it. You can host it on your server or they can host it for you, in this case you will just have to add the snippet in your code.
  7. Finally i got it to work just by removing the script line from the module, and placing it right before the /body tag on the index. the script works and the site doesn't returns error hope this will help someone
  8. You can do it using PS. you will need two images, first one with the boxes which disappear, and the second one you already have so first find an stock image you could use.. in photoshop you will put each image in separate layer, and order the layers so that the one with the boxes is the first layer then you can simply use the brush tool (reduce the flow and opacity to 20, 30) and start wiping the image, you will see the one beneath it soon anyway, if it sounds too complicated send me the two images and i'll do it for you. cheers
  9. update: it came up that the problem is with the Octal Gallery module. here is the code from the module, i have added the defer="defer" on line 10, but it doesent helps... any idea? <?php /** * Module Octal Gallery */ // no direct access defined( '_VALID_MOS' ) or die( 'Restricted access' ); ?> <script type="text/javascript" src="<?php echo $mosConfig_live_site;?>/templates/<?php echo $mainframe->getTemplate(); ?>/js/slimbox.js" defer="defer"></script> <?php $imageCount = 1; $folder = trim($params->get( 'imagefolder' )); $thumb = trim($params->get( 'thumbfolder' )); $w = trim($params->get( 'width' )); $h = trim($params->get( 'height' )); $f = opendir($mosConfig_absolute_path ."/images/".$folder.""); $images = array(); while ($file = readdir ($f)) { if($file!='.' && $file!='..' && $file!='Thumbs.db' && $file!=$thumb) { $images[] = $file; } } shuffle($images); if($imageCount > count($images)) { $imageCount = count($images); } for ($i = 0; $i < $imageCount; $i++) { echo '<div style="margin:5px 5px 5px 5px; ">'; echo '<a href="images/'.$folder.'/'.$images[$i].'" rel="lightbox"><img src="images/'.$folder.'/'.$thumb.'/'.$images[$i].'" border="0" height="'.$h.'" width="'.$w.'" /></a>'; echo '</div>'; } closedir($f); ?>
  10. Hi guys, my site works perfectly on ff but on any version of IE it shows "Operation Aborted" error and the site doesn't shows at all. I know that the problem is with one of the scripts i'm calling but i can't find out which one is causing it :S The site uses joomla, so i have tried disabling the modules one by one and it seems that it's not up to them (if you enter the link to the forum for example the site shows in IE), so the problem is on the front page. I'm assuming that it has something to do with the rokmininews module (it's module from another template adopted to this one) since it delivers scripts inside the <body> but even script deffer=”deffer” doesn't helps. i must sort this out, so any help or tip is appreciated. thanks. Baze
  11. Sorry man, you did great job, it came up that the problem was (actually still is) that the module is calling prototype.js and it has problem with prototype.lite.js which i'm using for the news module so that was the issue. Now i'm looking for a way to sort the compatibility... anyway, your code did the work THANKS!
  12. Hmmm that's strange, after enabling the module i've lost the main module for news. Plus this one only shows the image as thumbnail, and when i click on it i don't see the main image, even thou the link is proper (i use firebug).. :S any thoughts?
  13. I'd use Joomla and Seyret video component. Actually I'm using this combination here.
  14. Hi guys, i'm trying to put a module fo Joomla which will show random image from a folder using lightbox. I've found only one module who does exactly what i need, but insted of showing only one image it prints all images in the directory. I know that the "while" part is reading all images inside the specified directory, but unfortunatelly i don't know php coding so i can't sort this out. Here is the code, what i need is to get random image instead of all of them... any help is appreciated <?php $folder = trim($params->get( 'imagefolder' )); $thumb = trim($params->get( 'thumbfolder' )); $w = trim($params->get( 'width' )); $h = trim($params->get( 'height' )); $f = opendir($mosConfig_absolute_path ."/images/".$folder.""); while ($file = readdir ($f)) { if($file!='.' && $file!='..' && $file!='Thumbs.db' && $file!=$thumb){ echo '<div style="margin:5px 5px 5px 5px; float:left;">'; echo '<a href="images/'.$folder.'/'.$file.'" rel="lightbox[roadtrip]"><img src="images/'.$folder.'/'.$thumb.'/'.$file.'" border="0" height="'.$h.'" width="'.$w.'" /></a>'; echo '</div>'; } } closedir($f); ?> cheers, Baze

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.