1
laden0868
Anyone have hack the xoops core to use memcache?
  • 2012/10/7 10:52

  • laden0868

  • Just popping in

  • Posts: 8

  • Since: 2010/9/8 1


I have just install memcache to server, and i m using it on my own modules..

but i found on the xoops php debug mode, when user logging in , the main page have query the database 14 times...


did anyone have already write some cache query method to query config, module user data and else...

i want to cache them all too,

modules and config table won't change freq...


14 times is too much i think..

ps. i haven't use xoops::load method, just call new memcache everytime..



2
laden0868
Re: Did xoops 2.5.4 fixed the cache and stylesheet problems???
  • 2011/11/22 6:17

  • laden0868

  • Just popping in

  • Posts: 8

  • Since: 2010/9/8 1


thx trabis!

because of lots of jquery plugin... easing, superfish, fancy box and else....
every module, each page have lots of js and css need to load...




3
laden0868
Did xoops 2.5.4 fixed the cache and stylesheet problems???
  • 2011/11/21 10:46

  • laden0868

  • Just popping in

  • Posts: 8

  • Since: 2010/9/8 1


Did xoops 2.5.4 fixed these problems?

https://xoops.org/modules/newbb/viewtopic.php?start=10&topic_id=69960&viewmode=flat&order=ASC&type=&mode=0

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

And the developer please tell us.....
On the latest version of xoops, version 2.5.4 final,

1. how to add a script or stylesheet correctly using browse.php?

2. i have written some js, need to use difference version of jquery, where should i put them that can call from browse.php correctly...





4
laden0868
I want to use this ajax jquery plugin for a submit form, but don't know how to connect xoops..
  • 2010/12/2 7:04

  • laden0868

  • Just popping in

  • Posts: 8

  • Since: 2010/9/8 1


Greeting to all , i want to use a jquery ajax plugin: "auto populating select boxes" for a submit form of the mxdirectory modules.

i have a topic on this thread

i m a beginner of xoops, and i m not a coder anyway..

that plugin have a php file that let us to connect the database,
the code is :
Quote:

if (@$_REQUEST['ajax']) {

// connect to local database 'test' on localhost

$link = mysql_connect('localhost', 'root', '');

if ($link == false) trigger_error('Connect failed - ' . mysql_error(), E_USER_ERROR);
$connected = mysql_select_db('test', $link); if ($connected) { $results = mysql_query('select * from test.select_chain where category="' . strtolower(mysql_real_escape_string(strip_tags($_REQUEST['category']))) . '"');

$json = array(); while (is_resource($results) && $row = mysql_fetch_object($results)) {
$json[] = '"' . $row->label . '"'; }

echo '[' . implode(',', $json) . ']'; die(); // filthy exit, but does fine for our example. }
else
{ user_error("Failed to select the database"); } }

?>




i have try to edit those code to this but not working..


Quote:

<?php

if (@$_REQUEST['ajax']) {

global $xoopsDB;

$results=$xoopsDB->query('select * from x620_xdir_select_chain where category="' . strtolower(mysql_real_escape_string(strip_tags($_REQUEST['category']))) . '"');

$json = array(); while (is_resource($results) && $row = $xoopsDB->fetch_object($results)) {

$json[] = '"' . $row->label . '"'; } echo '[' . implode(',', $json) . ']'; die();
}

?>



can anyone tell me how to connect the database correctly,
or is that xoops need to install some plugin for json and else??

thank you very much, and sorry to my poor english.....



5
laden0868
auto populating select boxes for submit form..
  • 2010/12/1 18:31

  • laden0868

  • Just popping in

  • Posts: 8

  • Since: 2010/9/8 1


Greeting to all , i want to use a jquery ajax plugin: "auto populating select boxes" for a submit form of the mxdirectory modules.

i have upload the sql file and test it on the server out of xoops, it works correctly!

then i try to make this works on xoops,

1. i have place those html code to the modules html file,

2. upload the sql file that the plugin provided to xoops modules prefix.

3. in the templates theme.html, i have include the jquery.js and the select-chain.js file in the header

4.the select-chain.php file i have place it to root, theme templates, modules root , modules templates directory..
(because i don't know the script "url:select-chain.php" means where)

i have edited the php file but not working...

here r the orignal php code, like this:
Quote:
<?php

if (@$_REQUEST['ajax']) {

// connect to local database 'test' on localhost

$link = mysql_connect('localhost', 'root', '');

if ($link == false) trigger_error('Connect failed - ' . mysql_error(), E_USER_ERROR);
$connected = mysql_select_db('test', $link); if ($connected) { $results = mysql_query('select * from test.select_chain where category="' . strtolower(mysql_real_escape_string(strip_tags($_REQUEST['category']))) . '"');

$json = array(); while (is_resource($results) && $row = mysql_fetch_object($results)) {
$json[] = '"' . $row->label . '"'; }

echo '[' . implode(',', $json) . ']'; die(); // filthy exit, but does fine for our example. }
else
{ user_error("Failed to select the database"); } }

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>Select Chain</title>
<style type="text/css" media="screen">
<!--
BODY { margin: 10px; padding: 0; font: 1em "Trebuchet MS", verdana, arial, sans-serif; }
BODY { font-size: 100%; }
H1 { margin-bottom: 2px; font-family: Garamond, "Times New Roman", Times, Serif;}
DIV.selHolder { float: left; border: 3px solid #ccc; margin: 10px; padding: 5px;}
TEXTAREA { width: 80%;}
FIELDSET { border: 1px solid #ccc; padding: 1em; margin: 0; }
LEGEND { color: #ccc; font-size: 120%; }
INPUT, TEXTAREA { font-family: Arial, verdana; font-size: 125%; padding: 7px; border: 1px solid #999; }
LABEL { display: block; margin-top: 10px; }
IMG { margin: 5px; }
SELECT { margin: 10px; width: 200px; }
-->
</style>

<script src="/js/jquery.js" type="text/javascript"></script>
<script src="select-chain.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
<!--
$(function () {
var cat = $('#categorySelect');
var el = $('#elementSelect');
var attr = $('#attributeSelect');

el.selectChain({
target: attr,
url: 'select-chain.php',
data: { ajax: true, anotherval: "anotherAction" }
});

// note that we're assigning in reverse order
// to allow the chaining change trigger to work
cat.selectChain({
target: el,
url: 'select-chain.php',
data: { ajax: true }
}).trigger('change');

});
//-->
</script>
</head>
<body id="page">
<div id="doc">
<h1>Select Chain</h1>
<div class="selHolder">
<h2>Element Category</h2>
<select id="categorySelect" name="category" size="5">
<option>Forms</option>
<option>Scripts</option>
</select>
</div>
<div class="selHolder">
<h2>Element</h2>
<select id="elementSelect" name="category" size="5">
<option>[none selected]</option>
</select>
</div>
<div class="selHolder">
<h2>Attributes</h2>
<select id="attributeSelect" name="category" size="5">
<option>[none selected]</option>
</select>
</div>
</div>
</body>
</html>



and i have edited the php file to this:

Quote:

<?php

if (@$_REQUEST['ajax']) {

global $xoopsDB;

$results=$xoopsDB->query('select * from x620_xdir_select_chain where category="' . strtolower(mysql_real_escape_string(strip_tags($_REQUEST['category']))) . '"');

$json = array(); while (is_resource($results) && $row = $xoopsDB->fetch_object($results)) {

$json[] = '"' . $row->label . '"'; } echo '[' . implode(',', $json) . ']'; die();
}

?>


i have copy a part of html code to modules index.html file..

Quote:
<select id="categorySelect" name="category" size="5"> <option>Forms</option> <option>Scripts</option> </select>

<select id="elementSelect" name="category" size="5"> <option>[none selected]</option> </select>

<select id="attributeSelect" name="category" size="5"> <option>[none selected]</option> </select>



i have include the jquery script and the plugin script on the header of the theme.html, like this:
Quote:

<script type="text/javascript">

$(function ()
{ var cat = $('#categorySelect');
var el = $('#elementSelect');
var attr = $('#attributeSelect');
el.selectChain({ target: attr, url: 'select-chain.php', data: { ajax: true, anotherval: "anotherAction" } });

// note that we're assigning in reverse order
// to allow the chaining change trigger to work

cat.selectChain({ target: el, url: 'select-chain.php', data: { ajax: true } }).trigger('change'); });

</script>



i have place this php file in the root , theme, modules, modules theme directory....

coz i don't know the script file " url: " means where.....

by the way i don't know how to correct those php code to connect the xoops database correctly..

in fect i m not a coder...haha

sorry for my poor english..

and thx for helping!




6
laden0868
Re: Report bugs of the 2.5 , about the jgrowl......
  • 2010/11/14 13:05

  • laden0868

  • Just popping in

  • Posts: 8

  • Since: 2010/9/8 1


Include this site, when u after login and the jgrowl pop up,
the top of the search input box no respond...
u need refesh the page, the problem will gone...

i m using php5.3, chrome, ie , firefox, opera, safr..... also the same....



7
laden0868
Report bugs of the 2.5 , about the jgrowl......
  • 2010/11/14 5:42

  • laden0868

  • Just popping in

  • Posts: 8

  • Since: 2010/9/8 1


when the jgrowl pop up, the background area that cover by the jgrowl pop up box, have no respond of hover and click...

even on this site too, when after login, that welcome message pop up and fade out, behind the pop up area if there are some links or else that can hover or click,

on this site, the top of the search box will no respond of hover and click after u login , because of the jgrowl message box , but when u refresh the brower it will be fine......

i use the latest ie, chrome, firefox, opera and safari tested....

where is the file of jgrowl? that i can move it to a space area.... till to a fix come out..



8
laden0868
Re: Blocks Not Shown for Some modules
  • 2010/11/13 2:23

  • laden0868

  • Just popping in

  • Posts: 8

  • Since: 2010/9/8 1


thx buddy, i solve the problem too...
very confuse that i can't find the block to drag.......




TopTop



Login

Who's Online

165 user(s) are online (105 user(s) are browsing Support Forums)


Members: 0


Guests: 165


more...

Donat-O-Meter

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

Latest GitHub Commits