xoops forums

Forum Index


Board index » All Posts (xsell)




xsell

Quite a regular
Posted on: 2010/2/16 21:23
xsell
xsell (Show more)
Quite a regular
Posts: 245
Since: 2008/9/2 1
#31

Re: Comment ID

Ok i can not belive how easy it was i looked into x_movie

and the answer was

// Comments
$modversion['hasComments'] = 1;
$modversion['comments']['itemName'] = 'lid';
$modversion['comments']['pageName'] = 'video_view.php';
$modversion['comments']['extraParams'] = array('cid');


it worked .. now it redierect me to the root comment where it should


xsell

Quite a regular
Posted on: 2010/2/16 21:15
xsell
xsell (Show more)
Quite a regular
Posts: 245
Since: 2008/9/2 1
#32

Re: Comment ID

Hello Ghia,
view.php , category.php Just Examples Names ..

Now lets Say you have a Video Gallery ..

You Click the Category name U must Go x.php?cid=1

Now you are in the Category Page .. there 10 Video Files in this Category .. So u click to view One x.php?cid=1&pid=4

where 4 is the video id and 1 is the category id ..

I have no problem with any thing but the Comment Call back or Redierect .. browser dose not redierect u to the comment root .. So wht i think i need it to Make an Extra Param with array('cid') or Make a call back Function to redierect the browser to the root comment ..

Looking in the Modules that uses Category like lisitng modules , maybe i can find clue .. But if Someone knows the answer . Hit Me..


xsell

Quite a regular
Posted on: 2010/2/16 17:48
xsell
xsell (Show more)
Quite a regular
Posts: 245
Since: 2008/9/2 1
#33

Re: Comment ID

Ghia ,

cid is the Category ID
pid is the item ID

So u click on the Categorey Name u go with

/modules/test/category.php?cid=1

then when click item

/modules/test/category.php?cid=1&pid=5




xsell

Quite a regular
Posted on: 2010/2/16 6:25
xsell
xsell (Show more)
Quite a regular
Posts: 245
Since: 2008/9/2 1
#34

Comment ID

Hello

I have Made a private Module , I have Problem with Comments post ..

When Comment Posted it redierect the Browser to Comment ID Not found. and i know why but cant figuer out how to solve it.

$modversion['hasComments'] = 1;
$modversion['comments']['itemName'] = 'pid';
$modversion['comments']['pageName'] = 'view.php';


as u can see the comment itemname is 'pid'

Now the Comments add Ok the Problem Only with the Redierect after the comment posted .. it dose not redirect me to none cooment .. the Reason is in the View page i Use 'cid' and 'pid' .. where cid is Category Id and pid is the item Id ..

so the redierect url looks like this
view.php?pid=4&com_id=8&com_rootid=8&com_mode=thread&com_order=0#comment8


when the redirect url should include the cid like this
view.php?cid=1&pid=4&com_id=8&com_rootid=8&com_mode=thread&com_order=0#comment8


So How to Fix it where the Redierect url includes cid ..


xsell

Quite a regular
Posted on: 2010/2/14 5:41
xsell
xsell (Show more)
Quite a regular
Posts: 245
Since: 2008/9/2 1
#35

Re: CRON MySQL Backup Script for 2.3, 2.4, 2.5 Series

@ghia

2- You Not assuming that All Xooper's Has More than 10MB Database .. Pluse to Send it as attachment has to be Optional , So if your Dump very Big , done enable it ..

@bjuti

This Been already done , and the Module Called i think Backup bbackup .. Look it up in the Download Section .. i remember i used the module once and the author said the bigdump .027 was adopted to the module to do the Restoration


xsell

Quite a regular
Posted on: 2010/2/13 4:31
xsell
xsell (Show more)
Quite a regular
Posts: 245
Since: 2008/9/2 1
#36

Re: CRON MySQL Backup Script for 2.3, 2.4, 2.5 Series

Thx for The Code .. but Take This .

1- Wht if someone somehow knows where is the file located.. and plays it 50 Times .. Or Million ? Wht going to happen to ur server .. So i would Suggest to creat e Simple code to check if the file was run before in X time ..

$run_already 'check.txt';
if (
file_exists($run_already)) {
    
$lastRun file_get_contents($run_already);
    if (
time() - $lastRun >= 86400) { 

       
// here  your code
        
         //update lastrun with current time
         
file_put_contents($run_alreadytime());
    } 
}


2- Email the Backup to the admin email...



xsell

Quite a regular
Posted on: 2010/2/11 8:46
xsell
xsell (Show more)
Quite a regular
Posts: 245
Since: 2008/9/2 1
#37

Re: XoopsFormSelect Array with db query

Thx Ghia ... .. I dont know how i couldt See that .. :)


xsell

Quite a regular
Posted on: 2010/2/11 7:13
xsell
xsell (Show more)
Quite a regular
Posts: 245
Since: 2008/9/2 1
#38

XoopsFormSelect Array with db query

HI

How to fill XoopsFormSelect with data directly from the db.

I need to get the Category Name in Drop Down Select Option ..

This wht i tried .. but it Only Brings One Category Name ..

$sql "SELECT cat_id,cat_name FROM ".$xoopsDB->prefix("test_category");
$result $xoopsDB->query($sql);

while (list(
$cat_id$cat_name) = $xoopsDB->fetchRow($result) ) {
$select_element = new XoopsFormSelect('''cat');
     
$select_element->addOption($cat_id$cat_name);

}
          
$form->addElement($select_element);



xsell

Quite a regular
Posted on: 2010/2/9 11:39
xsell
xsell (Show more)
Quite a regular
Posts: 245
Since: 2008/9/2 1
#39

Re: Open text file , Write and Save

try

$filename "somefile.txt";
$data $_POST['edit'];
if (
$data != '') {

$files fopen($filename'w') or die('Could not open file!');

$files_b fwrite($files,stripslashes($data)) or die('Could not write
to file'
);

fclose($files);
}

  
$files_h fopen($filename"r") or die("Could not open file!");

  
$data fread($files_hfilesize($filename)) or die("Could not read file!");

  
fclose($files_h);

 echo 
"<h3>edit</h3>

<form action='
$_SERVER[php_self]' method= 'post' >
<textarea name='edit' cols='60' rows='20'> 
$data </textarea><BR><BR>
<input type='submit' value='<<save>>'>
</form>"
;


xsell

Quite a regular
Posted on: 2010/2/9 8:47
xsell
xsell (Show more)
Quite a regular
Posts: 245
Since: 2008/9/2 1
#40

Open text file , Write and Save

Hello

Is XOOPS uses any Class to Open a Text File in Dhtml TextArea
to edit and save..i have a text file in my root site i need to load it in textarea to edit the save..

I can do it in Pure php , fopen, fwrite.fclose.. But Just wondering if XOOPS uses other Methods..Load a text file to Textarea..



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