31
xsell
Re: Comment ID
  • 2010/2/16 21:23

  • xsell

  • Quite a regular

  • Posts: 245

  • Since: 2008/9/2 1


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



32
xsell
Re: Comment ID
  • 2010/2/16 21:15

  • xsell

  • Quite a regular

  • Posts: 245

  • Since: 2008/9/2 1


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..



33
xsell
Re: Comment ID
  • 2010/2/16 17:48

  • xsell

  • Quite a regular

  • Posts: 245

  • Since: 2008/9/2 1


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





34
xsell
Comment ID
  • 2010/2/16 6:25

  • xsell

  • Quite a regular

  • Posts: 245

  • Since: 2008/9/2 1


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 ..



35
xsell
Re: CRON MySQL Backup Script for 2.3, 2.4, 2.5 Series
  • 2010/2/14 5:41

  • xsell

  • Quite a regular

  • Posts: 245

  • Since: 2008/9/2 1


@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



36
xsell
Re: CRON MySQL Backup Script for 2.3, 2.4, 2.5 Series
  • 2010/2/13 4:31

  • xsell

  • Quite a regular

  • Posts: 245

  • Since: 2008/9/2 1


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...




37
xsell
Re: XoopsFormSelect Array with db query
  • 2010/2/11 8:46

  • xsell

  • Quite a regular

  • Posts: 245

  • Since: 2008/9/2 1


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



38
xsell
XoopsFormSelect Array with db query
  • 2010/2/11 7:13

  • xsell

  • Quite a regular

  • Posts: 245

  • Since: 2008/9/2 1


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);




39
xsell
Re: Open text file , Write and Save
  • 2010/2/9 11:39

  • xsell

  • Quite a regular

  • Posts: 245

  • Since: 2008/9/2 1


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>"
;



40
xsell
Open text file , Write and Save
  • 2010/2/9 8:47

  • xsell

  • Quite a regular

  • Posts: 245

  • Since: 2008/9/2 1


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 »



Login

Who's Online

286 user(s) are online (180 user(s) are browsing Support Forums)


Members: 0


Guests: 286


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