21
3lr0n
my webpage only shows in FF
  • 2009/12/8 23:19

  • 3lr0n

  • Not too shy to talk

  • Posts: 167

  • Since: 2004/3/13


Hello,

I have an strange problem.

I normally develop on FF, but when I check how the page is show with IE8 and Opera 10, i have only a blank page...

but with FF works...

In IE8 and opera i cant see anything, no debug, nothing.. just an empty code..

I dont know how to check what is making the problem, any help?

regards



22
3lr0n
Re: xoopstpl -> assign
  • 2009/12/8 14:27

  • 3lr0n

  • Not too shy to talk

  • Posts: 167

  • Since: 2004/3/13


Forget it

I was looking to wrong userinfo.php.. i have to check /modules/profile/userinfo.php, not the one in root directory :F



23
3lr0n
xoopstpl -> assign
  • 2009/12/8 14:18

  • 3lr0n

  • Not too shy to talk

  • Posts: 167

  • Since: 2004/3/13


Hello, Im trying to customize the profile page ans want to place some variables, like number of posts and member since, outside the structure of this <{foreach}> on profile_userinfo.html
<{foreach item=category from=$categories}>
    <{if isset(
$category.fields)}>

     <
div class="profileUserCatTitle"><{$category.cat_title}></div>
     <
div class="profileUserCatContent mozall">
      <{foreach 
item=field from=$category.fields}>
   <
div class="profileUserCatFields">  <b><{$field.title}></b>:  <{$field.value}></div>
        <{/foreach}>
     </
div>


    <{/if}>
<{/foreach}>

**
The classes and structure are already modified to fit my need.
So i take a look to userinfo.php, and noticed that a lot of variables are already assigned via xooptpl-> assign, not all of them works on the template. I mean, i found for example this in userinfo.php
$xoopsTpl->assign('user_posts'$thisUser->getVar('posts'))
and thought it will be as easy as set the variable in the place i need like this <{$user_posts}>... but this didnt work.. and dont know why some of them, like <{$user_id}> have a value and this assigned same way doesnt. regards 3lr0n



24
3lr0n
Re: smarty global variables
  • 2009/12/6 22:49

  • 3lr0n

  • Not too shy to talk

  • Posts: 167

  • Since: 2004/3/13


it works.. (as usual)

thanks trabis



25
3lr0n
Re: smarty global variables
  • 2009/12/6 19:57

  • 3lr0n

  • Not too shy to talk

  • Posts: 167

  • Since: 2004/3/13


anyone can help me?



26
3lr0n
smarty global variables
  • 2009/12/5 9:49

  • 3lr0n

  • Not too shy to talk

  • Posts: 167

  • Since: 2004/3/13


Hello, I need to make use of loged user avatar and was planning to set a smarty global variable with this (<{$xoops_avatar}>), but cant find where this vbles are declarated. Any help on finding?



27
3lr0n
Re: News 1.64 + attachment of the image
  • 2009/11/25 19:29

  • 3lr0n

  • Not too shy to talk

  • Posts: 167

  • Since: 2004/3/13


Can you explain yourself a bit more? I dont understand the message...



28
3lr0n
Re: News 1.64 + attachment of the image
  • 2009/11/25 14:32

  • 3lr0n

  • Not too shy to talk

  • Posts: 167

  • Since: 2004/3/13


I mean that news 1.64 allready have the feature to attach one single image to a single article, but the problem is that it is not shown on the index page where all the articles are listed, by default only is shown in the detailed view (article.php). What i posted is a little modificacion to code and templates to show this image in index listig page.

PS: Thks , version 2 is near..



29
3lr0n
Re: news 1.64 rating system hack
  • 2009/11/24 20:04

  • 3lr0n

  • Not too shy to talk

  • Posts: 167

  • Since: 2004/3/13


Quote:
But with your current code the rating of the article will get lower and lower an lower instead of higher...


function news_updaterating($storyid)
{
    global 
$xoopsDB;
    
$query 'SELECT rating FROM '.$xoopsDB->prefix('stories_votedata').' WHERE storyid = '.$storyid;
    
$voteresult $xoopsDB->query($query);
    
$votesDB $xoopsDB->getRowsNum($voteresult);
    
$totalrating 0;
    while(list(
$rating)=$xoopsDB->fetchRow($voteresult)){
        
$totalrating += $rating;
    }
     
$finalrating $totalrating//$votesDB;
    
$finalrating number_format($finalrating4);
    
$sql sprintf("UPDATE %s SET rating = %u, votes = %u WHERE storyid = %u"$xoopsDB->prefix('stories'), $finalrating$votesDB$storyid);
    
$xoopsDB->queryF($sql);
}


Just comment in the $finalrating line where it makes the division and "voila", you have a increasing rating , if all the points are +1 , the votes and the points are same.

<input type="hidden" name="submit" value="1" />


works fine.. thanks



30
3lr0n
news 1.64 rating system hack
  • 2009/11/24 18:25

  • 3lr0n

  • Not too shy to talk

  • Posts: 167

  • Since: 2004/3/13


Hello,

Iam trying to modify the rating system of news 1.4 module to set in index.php and article.php (news listing and news detail pages) a +1 point vote clicking and image (thumbs up or somethink like that), the problem is that this code on index.html (template file) redirects me to voting page (ratenews.php) instead of updating the votes.

<form action="<{$xoops_url}>/modules/news/ratenews.php" method="post">
               <
input type="hidden" value="<{$story.id}>" name="storyid"/>
                <
input type="hidden" value="1" name="rating"/>
                <
input type="image" src="<{$xoops_url}>/modules/news/images/thumbs_up.gif">
                </
form>


The only change is that the form is submitted from another page (index.php instead of ratenews.php) and the select is replace with a hidden field with the vote value).

Any idea?

PS: I have allready modifed the class to avoid the average calculation and only sum the votes.




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



Login

Who's Online

250 user(s) are online (173 user(s) are browsing Support Forums)


Members: 0


Guests: 250


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