131
deka87
Re: Xoops 2.5.3 Profile default avatar ussue
  • 2011/10/18 13:03

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


this one works! thanks!
Mind anchors



132
deka87
Re: Profile module search ain't working
  • 2011/10/18 13:02

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


thanks trabis! I used to have those links in 2.2 and it would be awesome to have them back.
Mind anchors



133
deka87
Re: Xoops 2.5.3 Profile default avatar ussue
  • 2011/10/18 4:37

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


@Trabis

I still have those avatars

@zyspec

user_avatar is set to blank.gif for users registered before the update and it is set to avatars/blank.gif for users registered after the update. I wonder if this thread makes sense from this point.
Mind anchors



134
deka87
Re: Profile module search ain't working
  • 2011/10/18 4:27

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


Quote:
Nice bugs deka :)


pain in my arse

Quote:
Please test this version of profile/search.php


it's fixed the thing, woop woop! everything works fine now. I wonder if I was the only one who had this issue.

also what is the static url for profile search results look like? say I am looking for a user from germany (the 'country' field) so I supposed the link should look like www.mysite.com/modules/profile/search.php?country=russia&op=results but it doesn't work
Mind anchors



135
deka87
Profile module search ain't working
  • 2011/10/17 12:51

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


Hi guys,

My profile module search doesn't work properly or doesn't work at all after I upgraded from 2.2 to 2.4.4 then to 2.5.3.

1. Opening profile/search.php - OK for Webmaster and Anonymous users. Debug indicates 0 errors.

2. I do a search: Webmaster gets several pages of results, the first page is ok, however when I go to the 2nd page or further (links looks likehttp://www.site/modules/profile/search.php?start=20&op=results&order=ASC&sortby=&limit=20) it doesn't fetch results by criteria but displays all users I have instead. Debug indicates 0 errors.
Anonymous users get a blank page or 500 internal server error. No errors by debug again.

I run out of ideas what the might be.
Mind anchors



136
deka87
Xoops 2.5.3 Profile default avatar ussue
  • 2011/10/17 11:59

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


hi guys,

I use this script to display random users avatars in a block

global $xoopsDB;   
$sql "SELECT u.uid, u.user_avatar, u.uname  FROM ".$xoopsDB->prefix("users")." u, ".$xoopsDB->prefix("groups_users_link")." g, ".$xoopsDB->prefix("profile_profile")." p WHERE u.uid = g.uid AND u.uid = p.profile_id AND u.level > 0 AND user_avatar <> 'blank.gif' AND u.uid NOT IN (1) ORDER BY RAND()";  
$result $xoopsDB->query($sql12);     
while (list(
$uid$user_avatar$uname) = $xoopsDB->fetchRow($result))     
{     
    echo 
'<div class="mosh"><a href="' XOOPS_URL '/userinfo.php?uid=' $uid '" title="' $uname '"><img src="' XOOPS_URL '/uploads/' $user_avatar '" alt="Avatar"  class="mosh" /></a></div>'
}
...


this code has been brought up several times here.

it used to display user avatars only but since I upgraded to 2.5.3 with its latest Profile it displays default grey avatars along with uploaded avatars. how do I ged rid of default avatars in the block? thanks in advance

Resized Image
Mind anchors



137
deka87
User profile AJAX rating hack
  • 2011/10/16 12:01

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


Hi,

I've recently had an urge to implement an ajax rating system to the profile module so users could rate each others' profiles to define reliable customers. So I came across an interesting AJAX solution I will share now. Here is what my profile page looks like now:

Resized Image


How to implement:

1. Donwload the file archive (15Kb) from here.

2. Import ratings.sql to your database. This will create a new table there.

3. Upload images/, js/ and css/ directories into your default theme directory.

4. Upload _config-rating.php, db.php, rpc.php and _drawrating.php into modules/profile/ directory. Edit _config-rating.php with your server info.

5. Edit your theme.html. Add
<script type="text/javascript" language="javascript" src="<{xoImgUrl}>js/behavior.js"></script>
<
script type="text/javascript" language="javascript" src="<{xoImgUrl}>js/rating.js"></script>
<
link rel="stylesheet" type="text/css" href="<{xoImgUrl}>css/rating.css" />

just before the closing </head> tag.

6. Edit userinfo.php. Add
require('_drawrating.php');
right before
$uid intval($_GET['uid']);
. Also add
//rating hack

if ( $xoopsUser ) {
$rate rating_bar($uid,'5');
$xoopsTpl->assign('rate'$rate);
} else {
$rate rating_bar($uid,'5','static');
$xoopsTpl->assign('rate'$rate); // we don't want anonymous users to vote so we give them a static picture
}

//end of hack

before
include $GLOBALS['xoops']->path('/include/comment_view.php')
.

7. Edit the profile_userinfo.html template and add
<{$rate}>
wherever you want your rating box to appear.

8. Clean your cache.

This is it. Enjoy your new AJAX rating system. This can be also easily implemented to any other module.
Mind anchors



138
deka87
Re: Adsense revenue sharing module
  • 2011/10/15 14:54

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


I dont think there is a module that will do it for you. But I think you can set it up yourself. What if to create an html field in the Profile module and call it like Your Adsense Code where users would have to submit their Adsense Ad block code. Then you will need to go to your articles module (say it's News), find a script that handles your article page (it's article.php for a News module) and add there a couple of lines which will call the article author uid and fetch the adsense code field value and assign the result to your template like this:
if(isset($adsense_code) && $adsense_code!= ''){ 
$xoopsTpl->assign('ad_block'$adsense_code);
}


I think it will work
Mind anchors



139
deka87
Re: Forget the redesign a moment.
  • 2011/10/13 3:53

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


you seem like the unluckiest user ever lol
Mind anchors



140
deka87
Re: cant insert image?
  • 2011/10/2 6:28

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


when you're creating a new custom block you can choose the type of your content (goes right after the Preview button) in that block. if you use html to insert your image you should choose html. however if you use bbcodes your should choose auto-form. with smileys enabled. try to change the content type of you block and you're gonna be done with it.

deka
Mind anchors




TopTop
« 1 ... 11 12 13 (14) 15 16 17 ... 96 »



Login

Who's Online

187 user(s) are online (142 user(s) are browsing Support Forums)


Members: 0


Guests: 187


more...

Donat-O-Meter

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

Latest GitHub Commits