151
slyss
Why this query don't work into 2.2.x? but it work into 2.0.x ?
  • 2006/11/26 10:00

  • slyss

  • Quite a regular

  • Posts: 343

  • Since: 2006/1/26


hi guys

i have made a custon block PHP with this code:

global $xoopsDB;

if(
$xoopsUser) {
$sql "SELECT * FROM ".$xoopsDB->prefix('myalbum2_photos')." WHERE submitter = ".$xoopsUser->getVar('uid')." ORDER BY rand() LIMIT 1");

$result $xoopsDB->query($sql);
$myrow $xoopsDB->fetchArray($result);
$lid_photo_profile $myrow['lid'];
$ext_photo_profile $myrow['ext'];
$RowsNum $xoopsDB->getRowsNum($result);
if(
$RowsNum )
{
echo 
"<img src='".XOOPS_URL."/uploads/thumb2/".$lid.".".$ext."' border='0' width='30' alt="Stefano Spadoni Network'>" ;
}
 else
{
  echo "non hai la thumb" ; //codice se la condizione è falsa;
}
}


this query work in 2.0.15 but he dosn't work in 2.2.5 ...

do you know why ?...

thanks a lot
[size=x-large]2008 Xoops Book[/size]



152
slyss
Re: How i can find a text ???
  • 2006/11/9 16:48

  • slyss

  • Quite a regular

  • Posts: 343

  • Since: 2006/1/26


yes yes yes yes yes

work great!!!!

thanks!!!!!! thanks a lot!!!

one question: where you have found this information? ... i have search into smarty site but i have found nothing...

thanks!!!!
[size=x-large]2008 Xoops Book[/size]



153
slyss
How i can find a text ???
  • 2006/11/9 11:50

  • slyss

  • Quite a regular

  • Posts: 343

  • Since: 2006/1/26


in my template is possible to do this:

<{if $now_text [color=FF0000][b]it contains[/b][/color'word'}> 
....
....
....
<{/if}>


it contains is wrong....

Exists an operator to do this ?

thanks a lot
[size=x-large]2008 Xoops Book[/size]



154
slyss
Re: Len in mysql
  • 2006/11/7 21:30

  • slyss

  • Quite a regular

  • Posts: 343

  • Since: 2006/1/26


Quote:

Bender wrote:
Just guessing:

Use Length instead of Len ?


yesssss

AND (LENGTH(t.description) > 100)


thanksssssssss
[size=x-large]2008 Xoops Book[/size]



155
slyss
Re: Len in mysql
  • 2006/11/7 18:02

  • slyss

  • Quite a regular

  • Posts: 343

  • Since: 2006/1/26


mmmmm i haven't understand my error....
[size=x-large]2008 Xoops Book[/size]



156
slyss
Len in mysql
  • 2006/11/7 14:00

  • slyss

  • Quite a regular

  • Posts: 343

  • Since: 2006/1/26


i need to know where i mistake...

i have do a query:

$sql "SELECT s.*, t.* FROM prefix_".$directory."_photos s, prefix_".$directory."_text t WHERE s.lid=t.lid AND (t.description LIKE '%Stefano%') AND [color=FF0000]((LEN(t.description)) > 900)[/color] ORDER BY rand() LIMIT 1";


The red text is mistake...

how i can solve it?

thanks a lot
[size=x-large]2008 Xoops Book[/size]



157
slyss
Re: Can you suggest me?
  • 2006/10/29 17:07

  • slyss

  • Quite a regular

  • Posts: 343

  • Since: 2006/1/26


up
[size=x-large]2008 Xoops Book[/size]



158
slyss
Can you suggest me?
  • 2006/10/28 8:25

  • slyss

  • Quite a regular

  • Posts: 343

  • Since: 2006/1/26


hi everybody and thaks to read my post

first of all sorry for my bad english... is not my first language

so... i need your suggestion about this:

i go to start "build" a new XOOPS site...

this XOOPS site will have a lot of users (10.000) and 500 access per day...

my question is:

do you suggest me to start with 2.0.15 or with 2.2.4 ???

i know 2.2.4 is not recommended for production site...

but i think 2.2.4 is more profit to manage better the site...

what do you think about this?

thanks a lot

sly
[size=x-large]2008 Xoops Book[/size]



159
slyss
Re: News 1.44 -> Show topic id in news_item.html
  • 2006/10/20 9:09

  • slyss

  • Quite a regular

  • Posts: 343

  • Since: 2006/1/26


Quote:

Bandit-X wrote:
put this.
in index.php of the news module, near line 202 (if using classic mode)
$story['topicid'] = $thisstory ->storyid();

and $story.topicid should work for the index.php (page that uses the news_index.html & news_item.html template files)


hi bandit-x and thanks for your reply

i have added the string
$story['news_title'] = $story['title'];
            
$story['title'] = $thisstory->textlink().'&nbsp;:&nbsp;'.$story['title'];
            
//string below added by slyss79
            
$story['topicid'] = $thisstory ->storyid();
            
$story['topic_title'] = $thisstory->textlink();
            
$story['topic_color'] = '#'.$myts->displayTarea($thisstory->topic_color);


but in now in my index.php he display (wrong) Topic's description

do you know why?

thanks a lot
[size=x-large]2008 Xoops Book[/size]



160
slyss
Re: News 1.44 -> Show topic id in news_item.html
  • 2006/10/19 9:22

  • slyss

  • Quite a regular

  • Posts: 343

  • Since: 2006/1/26


Quote:

tcnet wrote:
$story.topicid


thanks a lot!!! it work!!!

but now i need to take "topic id" also in template news_index.html and $story.topicid dosen't work...

thanks for your time...
[size=x-large]2008 Xoops Book[/size]




TopTop
« 1 ... 13 14 15 (16) 17 18 19 ... 22 »



Login

Who's Online

251 user(s) are online (157 user(s) are browsing Support Forums)


Members: 0


Guests: 251


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