vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   mYvBindex v3.1 (https://vborg.vbsupport.ru/showthread.php?t=44691)

chipheodeptrai 11-07-2002 04:47 PM

Hi

When i quote...have erorr in newreply :

Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /home/myweb/public_html/vtf/newreply.php(47) : eval()'d code on line 1

whats happen

Thanks

Tigga 11-07-2002 07:44 PM

chipheodeptrai - Do you have any other hacks installed where you modified newreply.php? The only modification made for this hack is one to add a field to the database to determine if the post is news, which shouldn't affect quoting a post.
For your question about adding forum info... Yes, it can be added fairly easily. Keep in mind though that for each thing you add (total posts, total threads, newest member, etc) it will add an additional query to your database. To add these, open your myvbindex.php file and look for :
PHP Code:

// Welcome Text & Buddy List or Logincode 

Then right above that add:
PHP Code:

// total members
$numbersmembers=$DB_site->query_first('SELECT COUNT(*) AS users,MAX(userid) AS max FROM user');
$numbermembers=number_format($numbersmembers['users']);

// get total posts
$countposts=$DB_site->query_first('SELECT COUNT(*) AS posts FROM post');
$totalposts=number_format($countposts['posts']);

// get total threads
$countthreads=$DB_site->query_first('SELECT COUNT(*) AS threads FROM thread');
$totalthreads=number_format($countthreads['threads']);

// get newest member
$getnewestusers=$DB_site->query_first("SELECT userid,username FROM user WHERE userid=$numbersmembers[max]");
$newusername=$getnewestusers['username'];
$newuserid=$getnewestusers['userid']; 

Then you would just add the variables $numbermembers, $totalposts, $totalthreads, and (for newest member) <a href="member.php?s=$session[sessionhash]&action=getinfo&userid=$newuserid">$newusername </a> to the template where you would like them to appear.


Goldknight - I should be able to release v2.1 by this weekend which will include news avatars plus a couple of other new features. And don't worry, upgrading will be easy. :)

If anyone has some suggestions for features they'd like added in future versions please let me know.

Goldknight 11-07-2002 08:03 PM

Quote:

Originally posted by PlurPlanet

Goldknight - I should be able to release v2.1 by this weekend which will include news avatars plus a couple of other new features. And don't worry, upgrading will be easy. :)

If anyone has some suggestions for features they'd like added in future versions please let me know.

Great! I gotta marry you :p I ll ask few members to see if there is any more to add. Will be back with suggestions or nothing.

speaking of avatar, is it individual avatar or just one news avatar? It ll be nice to have individual avatar normal just like postbit.

Graphics 11-08-2002 05:03 AM

will u put the colour onlines addons in fortoday online and currently online

Goldknight 11-13-2002 04:10 AM

PlurPlanet, any luck with avatar?

There is one concern that I need your help with. I have two different style and selectable for members to use. Anyway after I change to different style and I modify style a bit to add home (wwwurl.com/index.php) to access myvbindex instead of delete in url in IE or whatever to access. And myvbindex kept old style even after I change the style. Not only that I tried to use url in IE to access and found it still keep old style too.

Is it possible for me to change that to work with multiple style to access myvbindex with whatever style I select? Thanks

Tigga 11-13-2002 10:46 AM

Sorry, I haven't had as much time to work on this lately. I've been doing a lot of work on my site, plus I've starting work on a bigger project. :)
It's not a problem getting it to display the news poster's avatar, but I've had problems getting it out of a query loop (basically for every news post it will add one query to the page). If you'd still like to add the avatars despite the loop let me know and I'll post the code to change. I'm not going to release the new version though until I can get that loop fixed.
For the styles - I just looked at it and it appears that the colors, images, and such are changing as they should, just not the header. Since your header is the same for your forums and your index, you should be able to look in your index template and replace "$index_header" with "$header". Then it will just pull your regular header templates instead of the index_header template. If for some reason that doesn't work let me know.

Oh, and Graphics... You should be able to do that using the hack on here. Just make the changes to myvbindex.php instead of your forums index.php file. I haven't really looked at that hack but it should work.

Goldknight 11-13-2002 04:36 PM

Replace $index_header with $header in index seem work =) Thanks also about avatar and queries, yeah I aint mind due to numbers of members anyway for present. Many thanks

Tigga 11-13-2002 10:56 PM

Ok, here's a quick & easy way to add the news avatars. I wouldn't recommend adding it if you have a couple of dozen news posts, but otherwise it won't really have an effect on performance.

In your myvbindex.php find:

// News Comments

Right above that add:

PHP Code:

$newsavatar='';
$newsavatarurl=getavatarurl($news[userid]);
  if (
$newsavatarurl=='') {
    
$newsavatarurl='images/clear.gif';
  } else {
  
$newsavatarurl=''.$newsavatarurl.'';
  }
  eval(
"\$newsavatar = \"".gettemplate('index_news_avatar')."\";"); 

Then create a new template called index_news_avatar with the following content:
PHP Code:

<img src="$bburl/$newsavatarurlborder="0"

(Of course you can edit that if you would like it to link to the news posters profile or something like that)

Then in your index_newsbits template add $newsavatar wherever you'd like the avatar to appear.
That's it. :)


I should have a little more time to work on the hack and release the next version by next week. After that I probably won't be releasing any future versions for a while as I'm going to be concentrating on a much bigger project that will combine myvbindex with a bunch of other options. Assuming everything goes well I'll be looking for beta testers in a few weeks, so I'll post more info about it then. :)

Goldknight 11-13-2002 11:21 PM

Great, thanks I m going to do that right away in an hour. Good luck about your project =) If you need a beta testers, lemme know, I d love to try yours =D Thanks for everything.

Tigga 11-14-2002 03:41 AM

Well it may be anywhere between a few weeks and a few months before it's done, but if everything goes well it's going to be very nice once I'm finished. I will most likely charge a little for this one, but as soon as it's ready for beta testing you'll be the first to get a copy. :)


All times are GMT. The time now is 09:23 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.02282 seconds
  • Memory Usage 1,764KB
  • 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
  • (4)bbcode_php_printable
  • (1)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