41
frankblack
Does anyone know how XoopsPageNav and jquery could work together?
  • 2010/1/6 15:13

  • frankblack

  • Just can't stay away

  • Posts: 830

  • Since: 2005/6/13


I am currently remaking my administration area for debaser, but I ran into problem.

I am using XoopsPageNav in order to limit the display of entries on a page. jquery loads the first part nicely into the div, but when I want to switch to the next page the url is called where my jquery resides in - which gives me a problem. Do I have to make my own XoopsPageNav or does anyone know a solution for this problem?



42
frankblack
Re: Integration Tiny Editor in Extcal
  • 2010/1/5 15:07

  • frankblack

  • Just can't stay away

  • Posts: 830

  • Since: 2005/6/13


Give this a try:

$form->addElement(new XoopsFormTinyeditorTextArea
  
(array('caption' => _AM_EXTCAL_DESCRIPTION'name' => 'event_desc''value' => $desc'width' => '100%''height' => '400px''xEditor' => '1'),false));


HTH



43
frankblack
Re: How to hide a xoopsform element row?
  • 2010/1/5 14:19

  • frankblack

  • Just can't stay away

  • Posts: 830

  • Since: 2005/6/13


Noone? OK, here is the complete crappy solution (even with jquery):

$xoTheme->addScript(null, array('type' => 'text/javascript''charset' => _CHARSET), '
$(document).ready(function() { 
document.getElementById("xoops_date[appear[date]]").parentNode.parentNode.style.display="none"; 
document.getElementById("xoops_date[vanish[date]]").parentNode.parentNode.style.display="none"; 
$("#timeset").click(function(){ if( $("#timeset").is(":checked")) { 
document.getElementById("xoops_date[appear[date]]").parentNode.parentNode.style.display="table-row"; 
document.getElementById("xoops_date[vanish[date]]").parentNode.parentNode.style.display="table-row"; } else { 
document.getElementById("xoops_date[appear[date]]").parentNode.parentNode.style.display="none"; 
document.getElementById("xoops_date[vanish[date]]").parentNode.parentNode.style.display="none"; } }); }); '
);


The first lines we need, because there is no way to identify the table row to make it initially invisible, because it looks like this:
<tr valign="top" align="left"><td class="head">


With the click on a checkbox the table rows will vanish. Another click shows them again.

But we have always to climb up the "dom-ladder" with parentNode.parentNode.

I praise the day we are getting rid of the table based xoopsform.



44
frankblack
How to hide a xoopsform element row?
  • 2010/1/5 12:00

  • frankblack

  • Just can't stay away

  • Posts: 830

  • Since: 2005/6/13


Can anyone point me to a clever way to hide a table row containing a xoopsform element?

Of course there a ids for the elements (have fun with calendar elements) and I can access them, BUT this would only hide the element itself and NOT the complete table row.

A freaky way would be:
document.getElementById("whatever").parentNode.parentNode;


BTW: it must be onchange instead of onChange.



45
frankblack
XoopsFormDateTime empty field?
  • 2010/1/4 18:12

  • frankblack

  • Just can't stay away

  • Posts: 830

  • Since: 2005/6/13


When I use XoopsFormDateTime the script always enters a value into the text field, which is very nice, but not always wanted.

I just want to have an empty input field, so that the current date/time will be not inserted when not set on purpose.



46
frankblack
Permissions driving me insane! [coding]
  • 2010/1/2 15:24

  • frankblack

  • Just can't stay away

  • Posts: 830

  • Since: 2005/6/13


Maybe I asked this before, but is there a way to get ALL permissions of a module in ONE query, so that I can make a check if a specific permission is set?

Whenever a checkRight is used a query will be used and when I am retrieving categories from the database and I make checkRight for every category a query is used. Wasted resources from my view.

This query could be filtered for gperm_name eg. starting with Debaser% so that other permissions for the module are excluded.

And WHY does gperm_itemid is splitted for each gperm_groupid?

Any help is appreciated!

BTW getObjects aren't getting me somewhere atm.



47
frankblack
Re: XOOHS - Health Class Systems
  • 2009/12/30 22:46

  • frankblack

  • Just can't stay away

  • Posts: 830

  • Since: 2005/6/13


hci ebah tpuahrebü neniek nalp novow eid eder tsi!

I wonder if you understand what I wrote. Same for me reading your post. What are you aiming at? What is the purpose of this Health Class System? Health sounds good to me anyway!

Could you please explain for the non-pros?

edit: sorry for not being polite



48
frankblack
Re: Converting from latin1 to utf8
  • 2009/12/30 11:48

  • frankblack

  • Just can't stay away

  • Posts: 830

  • Since: 2005/6/13


I guess that xsell is using a Windows-1256 charset which gives you more than one problem.

Any script using htmlentities will fail on this charset for instance. More weird: my database collation is utf8_general_ci. When I add a file the field is filled with (hope this will not be destroyed):
Quote:
ÚÈÏ ÇáÈÇÓØ??? ??????


When I edit the file the database field shows the following:
Quote:
ÚÈÏ ÇáÈÇÓØ??? ??????


Some strange characters at the beginning and arabic characters after the tenth character (which are lost here).

edit: first quotes original entry was (have to put blanks between them):
Quote:
& # 218;& # 200;& # 207; & # 199;& # 225;& # 200;& # 199;& # 211;& # 216;& # 1593;& # 1576;& # 1583; & # 1575;& # 1604;& # 1576;& # 1575;& # 1587;& # 1591;


edit: WEIRD! On first submission, before editing this quote one WAS HOLDING ARABIC CHARS, after editing they were replace by questionmarks. ???



49
frankblack
Manual: Using imagemagick with XAMPP on Windows
  • 2009/12/29 13:50

  • frankblack

  • Just can't stay away

  • Posts: 830

  • Since: 2005/6/13


What a joyride! This wasn't sooo easy, so this manual might be helpful?

The standard installation of XAMPP for Windows makes it nearly impossible to use ImageMagick out-of-the-box, because PHP is compiled with VC6, but we need it to be compiled with VC9 (whatever this means).

What we need is:
PHP 5.3.1 (if you use XAMPP 1.7.3) as VC9 x86 Thread Safe - Take the zip from HERE
ImageMagick from HERE - take the latest version. When experiencing problems you have to install Visual C++ 2008 Redistributable Package (see bottom of this page)
The php_imagick_ts.dll - get it HERE

Installation of all the files (assuming your path to XAMPP is c:/xampp
1. Rename c:/xampp/php to c:/xampp/phpvc6 for good measure, because you need some values from php.ini located in there.
2. Make a new folder called php in c:/xampp. Extract the php.zip and copy the contents of this folder to c:/xampp/php
3. Compare the old php.ini and the new php.ini and make some changes to the new one. Especially watch out for the path to the extension. At the extensions part you have to add one entry: extension=php_imagick_ts.dll
4. Edit c:/xampp/apache/conf/httpd.conf and add the following line at the end of this file:
SetEnv MAGICK_HOME C:/xampp/imagemagick

5. Install imagemagick to c:/xampp. Make sure, that adding the path to imagemagick is checked. Other things do not have to be checked.
6. Restart your PC
7. Start XAMPP and have a look at your phpinfo now.

Test imagemagick with the following code (borrowed from somewhere in the web, sorry can't remember where) and save it to htdocs:
<?php
error_reporting
(E_ALL);
ini_set("display_errors"1);

$im = new Imagick();
$im->newImage(100100"green""png");

$draw = new ImagickDraw();
$draw->setFillColor("white");
$draw->setStrokeWidth(1);
$draw->setStrokeColor("black");
$draw->circle(50505090);
$im->drawImage($draw);

$itWorks "It works!";
$draw = new ImagickDraw();
$draw->setStrokeColor("black");
$draw->setTextAlignment(Imagick::ALIGN_CENTER);
$metrics $im->queryFontMetrics($draw$itWorks);
$adjustY = ($metrics["textHeight"] + $metrics["descender"]) / 2// ~ vertical align: middle
$draw->annotation(5050 $adjustY"It works!");
$im->drawImage($draw);

header("Content-Type: image/" $im->getImageFormat());
echo 
$im->getImageBlob();
?>


Now browse this file and hopefully everything works - good luck!

edit: you cannot copy all settings from your old php.ini to the new one, because you need dlls for the VC9 version



50
frankblack
Re: Webinstall and reCaptcha
  • 2009/12/23 22:28

  • frankblack

  • Just can't stay away

  • Posts: 830

  • Since: 2005/6/13


Any kind of captcha, even recaptcha cannot SOLVE all problems. Got some nice articles HERE (in english) and HERE (in german).

I am using an icon/javascript click-based captcha and it works nice (for the moment).




TopTop
« 1 2 3 4 (5) 6 7 8 ... 53 »



Login

Username:
Password:

Lost Password? Register now!

Who's Online

68 user(s) are online (32 user(s) are browsing Support Forums)


Members: 0


Guests: 68


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Jun 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits