11
sarahmx
Re: Publisher and xoops 2.5.8 tests
  • 2017/3/10 21:45

  • sarahmx

  • Quite a regular

  • Posts: 381

  • Since: 2007/10/28


i figured out the problem

the uploads/publisher/content and uploads/testing/content are not created automatically

i created the folder and now is ok


but still have this problem

Resized Image



12
sarahmx
Re: Publisher and xoops 2.5.8 tests
  • 2017/3/10 15:12

  • sarahmx

  • Quite a regular

  • Posts: 381

  • Since: 2007/10/28


i download the latest XOOPS from github just for testing purpose

publisher 1.05 Beta
PHP 5.6.29
mySQL 5.6.34

a. Download and installed Publisher
Resized Image

wrong translation ?

arent it should be clone ?

2. Clone publisher module named testing

Install testing module

3. create a new category

4. set permission Fields available in articles submission forms
Resized Image


5. try to create an article ihave page like this..with no style and missinf editor buttons
Resized Image



13
sarahmx
Re: how do is sort select boxes alphabetically in profile module ?
  • 2017/3/10 15:05

  • sarahmx

  • Quite a regular

  • Posts: 381

  • Since: 2007/10/28


Thank you trabis..its working



14
sarahmx
Re: how do is sort select boxes alphabetically in profile module ?
  • 2017/3/8 11:37

  • sarahmx

  • Quite a regular

  • Posts: 381

  • Since: 2007/10/28


i saw this code in modules/profile/class/field.php
case 'select':
                
$element = new XoopsFormSelect($caption$name$value);
                
// If options do not include an empty element, then add a blank option to prevent any default selection
//                if (!in_array('', array_keys($options))) {
                
if (!array_key_exists(''$options)) {
                    
$element->addOption(''_NONE);

                    
$eltmsg                          = empty($caption) ? sprintf(_FORM_ENTER$name) : sprintf(_FORM_ENTER$caption);
                    
$eltmsg                          str_replace('"''"'stripslashes($eltmsg));
                    
$element->customValidationCode[] = "nvar hasSelected = false; var selectBox = myform.{$name};" "for (i = 0; i < selectBox.options.length; i++) { if (selectBox.options[i].selected == true && selectBox.options[i].value != '') { hasSelected = true; break; } }" "if (!hasSelected) { window.alert("{$eltmsg}"); selectBox.focus(); return false; }";
                }
                
$element->addOptionArray($options);
            
                break;


what do i need to change ?



15
sarahmx
Re: how do is sort select boxes alphabetically in profile module ?
  • 2017/3/8 3:09

  • sarahmx

  • Quite a regular

  • Posts: 381

  • Since: 2007/10/28


Bumping 6 year old thread

Resized Image

anyone ? How do i sort the select box created using the profile module



16
sarahmx
Re: extcal database query
  • 2017/3/8 2:58

  • sarahmx

  • Quite a regular

  • Posts: 381

  • Since: 2007/10/28


noted and tq Bleek



17
sarahmx
Re: extcal database query
  • 2017/3/7 6:12

  • sarahmx

  • Quite a regular

  • Posts: 381

  • Since: 2007/10/28


Thank you zyspec...all now is working



$time time();  
$today=date("d/m/Y"strval($time)); 


global  
$xoopsDB
$sql "SELECT * FROM " $xoopsDB->prefix('extcal_event') . " ";  
if (
$result===false) {  
    die(
$xoopsDB->error());   
}  
$result $xoopsDB->query($sql);  

while(
$row=$xoopsDB->fetchArray($result)) { 
$event_title $row['event_title'];  
$event_start=date("d/m/Y"strval($row["event_start"])); 
$event_end=date("d/m/Y"strval($row["event_end"])); 

//if ((date('d/m/Y', $row['event_start'])) == $today OR (date('d/m/Y', $row['event_end'])) == $today){  

if ($event_start == $today OR $event_end==$today OR $row['event_start'] <= $time && $time <= $row['event_end']){ 
 echo 
$row['event_title'];  
    }  
}



18
sarahmx
Re: extcal database query
  • 2017/3/7 4:30

  • sarahmx

  • Quite a regular

  • Posts: 381

  • Since: 2007/10/28


i tried it something like this but its not working

$time time(); 
$today=date("d/m/Y"strval($time));


global  
$xoopsDB;
$sql "SELECT * FROM " $xoopsDB->prefix('extcal_event') . " "
if (
$result===false) { 
    die(
$xoopsDB->error());  

$result $xoopsDB->query($sql); 

while(
$row=$xoopsDB->fetchArray($result)) {
$event_title $row['event_title']; 
$event_start=date("d/m/Y"strval($row["event_start"]));
$event_end=date("d/m/Y"strval($row["event_end"]));

//if ((date('d/m/Y', $row['event_start'])) == $today OR (date('d/m/Y', $row['event_end'])) == $today){ 

if ($event_start <= $today  && $today <= $event_end){ 
 echo 
$row['event_title']; 
    } 
}



19
sarahmx
Re: extcal database query
  • 2017/3/7 1:22

  • sarahmx

  • Quite a regular

  • Posts: 381

  • Since: 2007/10/28


Thank you its working bleek..i added event_end also

if ((date('d/m/Y'$row['event_start'])) == $today OR (date('d/m/Y'$row['event_end'])) == $today){


but if i have 3 days event

let say 1/3 to 3/3 and today is 2/3 how should i change my code to display the event for 2/3



20
sarahmx
extcal database query
  • 2017/3/6 8:49

  • sarahmx

  • Quite a regular

  • Posts: 381

  • Since: 2007/10/28


Hello XOOPSian

can you help me with this query

i would like to show todays event manually using the query below outside of xoops..currently testing this in localhost inside XOOPS

event_start is stored as integer eg 1306112400

$time time(); 
//echo $time;
$today=date("d/m/Y"strval($time));
//echo $today;

global  $xoopsDB;
$sql "SELECT * FROM " $xoopsDB->prefix('extcal_event') . "  WHERE DATE_FORMAT(event_start, '%d/%m/%Y')='$today' ORDER BY event_start";


The code is not working at the moment, can you guys help me..Please




TopTop
« 1 (2) 3 4 5 ... 32 »



Login

Who's Online

217 user(s) are online (140 user(s) are browsing Support Forums)


Members: 0


Guests: 217


more...

Donat-O-Meter

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

Latest GitHub Commits