vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Give Your Users a Custom Page on Your Site (https://vborg.vbsupport.ru/showthread.php?t=91903)

demios 04-22-2006 10:04 AM

I noticed that the userpage list was filled with empty pages. I changed two lines so that it only lists pages that have some pagedata.

first change line 530 of userpage.php

Original code
PHP Code:

FROM " . TABLE_PREFIX . "userpage 

Modified code ( the '' at the end it two ' symbols NOT a single " )
PHP Code:

FROM " . TABLE_PREFIX . "userpage WHERE pagedata <> '' 

second change line 584 of userpage.php

Original code
PHP Code:

$users $db->query_read("SELECT * FROM " TABLE_PREFIX "userpage ORDER BY username ASC LIMIT $limitlower,$perpage"); 

Modified code
PHP Code:

$users $db->query_read("SELECT * FROM " TABLE_PREFIX "userpage WHERE pagedata <> '' ORDER BY username ASC LIMIT $limitlower,$perpage"); 


dwbro1 04-22-2006 05:40 PM

These changes just gave me a blank page.. sorry..

demios 04-22-2006 07:57 PM

Quote:

Originally Posted by dwbro1
These changes just gave me a blank page.. sorry..

I have made the post easier to read now.

Cut and Paste the lines or just add the

WHERE pagedata <>''

sections

Insert Username 04-22-2006 08:38 PM

Excellent, demion! Fantastic change to the code. Keeps me from having to go through all the time and delete blank pages.

Keyser S?ze 04-23-2006 02:09 AM

i did everything it said to upgrade from 1.0.1 to this version, it seemed to go fine, yet in my list of products it still says im on ver 1.0.1

dwbro1 04-23-2006 02:23 AM

well not getting blank page anymore but still showing the other users in the list. Something else must be causing them to think there is info there. Here is link you can see.

http://thebluelodge.org/forums/userpage.php

Nachtfalke 04-23-2006 11:50 AM

Great Hack, I installed it without any trouble. I have a suggestion: Would it be possible to enhance the Hack that way, that I can use the Shoutbox feature as a personal guestbook? Since you used the datafield-type "longtext", the only thing that has to be changed is to show up the full and the quick editor. I am no coder, so I have no clue how to realize that. Any help is gladly apreciated!

demios 04-25-2006 12:20 PM

If anyone is having a problem with the rating popup this is because there is a ">" missing in the userpage template.

It is missing from a table tag which appears as <\table rather than <\table>.
It is just above "<if condition="$show['popups']">" if anyone wants to fix theirs.

demios 04-25-2006 12:34 PM

Quote:

Originally Posted by dwbro1
well not getting blank page anymore but still showing the other users in the list. Something else must be causing them to think there is info there. Here is link you can see.

http://thebluelodge.org/forums/userpage.php

Ok this needs you to modify three lines of code just adding the same bit:

On line 142 original code
PHP Code:

LEFT JOIN ".TABLE_PREFIX."user AS t2 ON(t1.userid=t2.userid

Modified code
PHP Code:

LEFT JOIN ".TABLE_PREFIX."user AS t2 ON(t1.userid=t2.useridWHERE pagedata <> '' 


On line 147 original code
PHP Code:

LEFT JOIN ".TABLE_PREFIX."user AS t2 ON(t1.userid=t2.userid

Modified code
PHP Code:

LEFT JOIN ".TABLE_PREFIX."user AS t2 ON(t1.userid=t2.useridWHERE pagedata <> '' 


On line 152 original code
PHP Code:

LEFT JOIN ".TABLE_PREFIX."user AS t2 ON(t1.userid=t2.userid

Modified code
PHP Code:

LEFT JOIN ".TABLE_PREFIX."user AS t2 ON(t1.userid=t2.useridWHERE pagedata <> '' 

You will notice that all the changes are identical, this is not a mistake.

All you are really doing is adding a WHERE command to the end of each of these rows:
PHP Code:

 WHERE pagedata <> '' 

So the database now only returns records WHERE pagedata is NOT EQUAL TO empty.

dwbro1 04-25-2006 01:32 PM

That did it Demios thanks a lot..


All times are GMT. The time now is 06:16 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02362 seconds
  • Memory Usage 1,761KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (11)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete