vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Forum Home Enhancements - Forum Title Language (https://vborg.vbsupport.ru/showthread.php?t=100589)

Marco van Herwaarden 11-10-2005 10:00 PM

Forum Title Language
 
1 Attachment(s)
Forum Title Language - v1.01

This modification should work on all vBulletin versions starting at 3.5.1. Latest version tested on: 3.8.1.

Description
If you are using multiple languages on your forum, this hack will allow you to translate your forum titles into the different languages. You members will see the title in the language they have set in their UserCP, or the default title if no translation is given.

Install
1 minute job.
1 Product
Upload the contents of the 'upload' folder in the zip to your forumhome, and import the productfile.

Usage
You will find a new menu option in the Forums & Moderators menu group in your AdminCP after installation. No need for instructions to use this.

Screenshots
Screenshots added.

Changelog:
11-11-2005 v1.00
- Initial release

16-11-2005 v1.01
- Added support for translated forum descriptions
- Translations now updated when a forum is deleted.

Marco van Herwaarden 11-11-2005 03:04 PM

Reserved for important notices

GrendelKhan{TSU 11-11-2005 03:25 PM

oh sure NOOOW you come out wiht this!!

I commissed (paid for) this hack just a week ago (I have descriptions working too). heh. oh well... I needed when I needed it and it was worth it. I'll take a look just for comparison purposes anyway. :)


future request: if you can make compatible with vbaGallery and vbaCMPS that would rule.

[high]* GrendelKhan{TSU clicks install. (for testing)[/high]

Marco van Herwaarden 11-11-2005 03:34 PM

I just didn't have time for descriptions now, i started to work on this this afternoon, and wanted to release it before my holiday since i already longtime promised people that i would look at it.

Descriptions will be added after my holiday (1 week).

I think this one will work with vba without modifications, but i didn't try. If they follow all the vB standards, it should just work.

But please give me feedback from your testing.

Marco van Herwaarden 11-11-2005 03:35 PM

Quote:

Originally Posted by GrendelKhan{TSU
GrendelKhan{TSU clicks install. (for testing)

You seem to have missed the button ;)

Daniel 11-11-2005 04:11 PM

Installed :)

Marco van Herwaarden 11-11-2005 04:13 PM

I would appreciate feedback of any thing more then i already mentioned in the first post that you like to be added.

nexialys 11-11-2005 04:24 PM

i have something on my side - coded sooner for 3.0.x - where users choose to display forum that are only in their own language... this can be mixed with this hack.. ;)
... just take what you want... :)

Ramsesx 11-11-2005 04:42 PM

Great Hack, exactly what I was looking for. Install it later on evening.
Thank you very much Marco

Snake 11-11-2005 04:44 PM

Lovely! :)

Ramsesx 11-11-2005 05:50 PM

Hm, installed, but can't see where I can change anything at all, looks same as before, please anybody can help?
Thanks

murrtex 11-11-2005 06:25 PM

Quote:

Originally Posted by Ramsesx
Hm, installed, but can't see where I can change anything at all, looks same as before, please anybody can help?
Thanks


me too,,where is the " titles"

Marco van Herwaarden 11-11-2005 06:28 PM

1 Attachment(s)
Oops, i already had the feeling i was forgetting something. Too much in a hurry to release it before i went out of the country (which is postponed until i don't know when).

Forgot to include the cpnav xml-file.

You can download the attached file and placee it in your ./includes/xml folder. Just refresh your AdminCP after uploading the file.

A new menu option will be added to the Forums & Moderators menugroup in your AdminCP after the file is uploaded.


Zip-file also updated.

Marco van Herwaarden 11-11-2005 06:33 PM

Lol, and someone already gave it a 1 star rating. Seems our 1-star rater is active again :D

Ramsesx 11-11-2005 06:49 PM

Thanks Marco, works perfect and very easy to handle it.
It would be great if you could make the same for vba links directory and gallery.
Wondering also about this spupid 1 star rater, I'll give you 5 ;)
Have a nice vacation.

Marco van Herwaarden 11-11-2005 06:55 PM

It does not work when in vBa? What parts need to be translated then?

BoYagoob 11-11-2005 07:14 PM

Great ..

installed :)

Ramsesx 11-11-2005 07:15 PM

The "Translated Titles" are only showing the Forum Titles, don't ask me too specificly about it but the vba Titles are not changed. Think it's because vba is not 100% integrated into vb.

Marco van Herwaarden 11-11-2005 07:48 PM

Well i guess you should ask the vBa coders to use standard functions. It would work then.

Marco van Herwaarden 11-11-2005 07:49 PM

Quote:

Originally Posted by nexialys
have something on my side - coded sooner for 3.0.x - where users choose to display forum that are only in their own language... this can be mixed with this hack..

Might be nice in combination with this. But i think that should be a seperate hack. Hiding parts of the board is something completly different.

murrtex 11-11-2005 08:17 PM

i install upload bu i can not still see links in acp forums-mods

Marco van Herwaarden 11-11-2005 08:29 PM

Did you install the contents of the upload folder to your forumhome?

You should have 2 new files:
./admincp/mh_fl_manager.php
./includes/xml/cpnav_mh_fl.xml

Then refresh the AdminCP

GrendelKhan{TSU 11-11-2005 08:29 PM

ooops sorry. clicked install now. ;)

Quote:

Originally Posted by MarcoH64
But please give me feedback from your testing.

Will do... I don't want conflict so I'll be installing yours on a test board.^^

murrtex 11-11-2005 09:23 PM

Quote:

Originally Posted by MarcoH64
Did you install the contents of the upload folder to your forumhome?

You should have 2 new files:
./admincp/mh_fl_manager.php
./includes/xml/cpnav_mh_fl.xml

Then refresh the AdminCP

yess all of them..
what's the link address maybe i can add to acp manually.?


oh i see mh_fl_manager.php.. ill try.

jimmyboy 11-11-2005 09:48 PM

bro, i've been waiting for alongtime

Ramsesx 11-11-2005 10:22 PM

Quote:

Originally Posted by MarcoH64
Well i guess you should ask the vBa coders to use standard functions. It would work then.

Hm, sad I don't think Brian (vba) will rewrite his software only for that.
But now it's a first step and I am happy about it.
One more question, did you thought about to make this translations in a way that it would be possible to add phrases into the forum titles?
I don't know absolutely anything about coding, maybe it is not an easy thing to do that. Thank you.

Marco van Herwaarden 11-12-2005 05:14 AM

Quote:

Originally Posted by Ramsesx
Hm, sad I don't think Brian (vba) will rewrite his software only for that.

Once i have spare time, i might have a look. ;)
Quote:

Originally Posted by Ramsesx
One more question, did you thought about to make this translations in a way that it would be possible to add phrases into the forum titles?

You mean in my translated titles, or also the standard titles?

Marco van Herwaarden 11-12-2005 05:16 AM

Quote:

Originally Posted by murrtex
yess all of them..
what's the link address maybe i can add to acp manually.?

If you have uploaded them, and have admin permissions for forums, you should see them. The only reasons it might not work is when the filesystem permissions don't allow reading, or if you're using a very old beta of 3.5 (or still on 3.0).

Ramsesx 11-13-2005 02:25 AM

Quote:

Originally Posted by MarcoH64
Once i have spare time, i might have a look. ;)
You mean in my translated titles, or also the standard titles?

That would be absolutely great :)
I meant the standard titles.
Thank you.

Marco van Herwaarden 11-13-2005 06:17 AM

Quote:

Originally Posted by Ramsesx
I meant the standard titles.

I am not sure i will go make that, sounds to me like a bit messy.

What would be the benefit of doing so?

GrendelKhan{TSU 11-14-2005 12:05 AM

Quote:

Originally Posted by Ramsesx
Hm, sad I don't think Brian (vba) will rewrite his software only for that.
But now it's a first step and I am happy about it.

I'm in the same boat. ;)

still love to see integration though...either from the hack author end or the vba end....whichever comes first. :p

Marco van Herwaarden 11-15-2005 10:44 AM

For those with problems in combination with vBAdvanced (asuming your talking about recent threads on homepage), you could do the following quick fix. Actually this could be an adviced change for all who use vBa, if they use my hack or not, it will reduce the load on the database server a little.

In modules/latesttopics.php find:
PHP Code:

        $threads $db->query_read("
                SELECT
                " 
iif($mod_options['portal_threads_showrating'], 'IF(votenum >= ' $vbulletin->options['showvotes'] . ', votenum, 0) AS numbvote, IF(votenum >= ' $vbulletin->options['showvotes'] . ' AND votenum != 0, votetotal / votenum, 0) AS voteavg,') . "
                thread.threadid, thread.title, thread.replycount, postusername, postuserid, thread.dateline AS postdateline, IF(views <= thread.replycount, thread.replycount+1, views) AS views, thread.lastposter, thread.lastpost, pollid
                " 
iif($mod_options['portal_threads_showsubscribed'] AND $vbulletin->userinfo['userid'], ', NOT ISNULL(subscribethread.subscribethreadid) AS subscribed') .
                
iif($mod_options['portal_threads_showicon'], ', thread.iconid AS threadiconid, iconpath AS threadiconpath') .
                
iif($mod_options['portal_threads_showforum'], ',thread.forumid, forum.title AS forumtitle') .
                
iif ($mod_options['portal_threads_showpreview'] AND $vbulletin->options['threadpreview'], ', post.pagetext AS preview') . "
                FROM " 
TABLE_PREFIX "thread as thread
                " 
iif($mod_options['portal_threads_showicon'], ' LEFT JOIN ' TABLE_PREFIX 'icon USING (iconid)') .
                
iif($mod_options['portal_threads_showforum'], ' LEFT JOIN ' TABLE_PREFIX 'forum AS forum ON (thread.forumid = forum.forumid)') .
                
iif($mod_options['portal_threads_showpreview'] AND $vbulletin->options['threadpreview'], ' LEFT JOIN ' TABLE_PREFIX 'post AS post ON (post.postid = thread.firstpostid)') .
                
$deljoin .
                
iif ($mod_options['portal_threads_showsubscribed'] AND $vbulletin->userinfo['userid'], ' LEFT JOIN ' TABLE_PREFIX 'subscribethread AS subscribethread ON (subscribethread.threadid = thread.threadid AND subscribethread.userid = ' $vbulletin->userinfo['userid'] . ')') . "
                WHERE open != 10 AND thread.visible = 1
                
$mods[threadids]
                
$mods[inforums]
                
$mods[exforums]
                
$notdeleted
                ORDER BY 
$mod_options[portal_threads_orderby] $mod_options[portal_threads_direction]
                LIMIT 
$mod_options[portal_threads_maxthreads]
        "
); 

and REPLACE by:
PHP Code:

        $threads $db->query_read("
                SELECT
                " 
iif($mod_options['portal_threads_showrating'], 'IF(votenum >= ' $vbulletin->options['showvotes'] . ', votenum, 0) AS numbvote, IF(votenum >= ' $vbulletin->options['showvotes'] . ' AND votenum != 0, votetotal / votenum, 0) AS voteavg,') . "
                thread.threadid, thread.forumid, thread.title, thread.replycount, postusername, postuserid, thread.dateline AS postdateline, IF(views <= thread.replycount, thread.replycount+1, views) AS views, thread.lastposter, thread.lastpost, pollid
                " 
iif($mod_options['portal_threads_showsubscribed'] AND $vbulletin->userinfo['userid'], ', NOT ISNULL(subscribethread.subscribethreadid) AS subscribed') .
                
iif($mod_options['portal_threads_showicon'], ', thread.iconid AS threadiconid, iconpath AS threadiconpath') .
                
iif ($mod_options['portal_threads_showpreview'] AND $vbulletin->options['threadpreview'], ', post.pagetext AS preview') . "
                FROM " 
TABLE_PREFIX "thread as thread
                " 
iif($mod_options['portal_threads_showicon'], ' LEFT JOIN ' TABLE_PREFIX 'icon USING (iconid)') .
                
iif($mod_options['portal_threads_showpreview'] AND $vbulletin->options['threadpreview'], ' LEFT JOIN ' TABLE_PREFIX 'post AS post ON (post.postid = thread.firstpostid)') .
                
$deljoin .
                
iif ($mod_options['portal_threads_showsubscribed'] AND $vbulletin->userinfo['userid'], ' LEFT JOIN ' TABLE_PREFIX 'subscribethread AS subscribethread ON (subscribethread.threadid = thread.threadid AND subscribethread.userid = ' $vbulletin->userinfo['userid'] . ')') . "
                WHERE open != 10 AND thread.visible = 1
                
$mods[threadids]
                
$mods[inforums]
                
$mods[exforums]
                
$notdeleted
                ORDER BY 
$mod_options[portal_threads_orderby] $mod_options[portal_threads_direction]
                LIMIT 
$mod_options[portal_threads_maxthreads]
        "
); 

Now find:
PHP Code:

        $mods['threadcount'] = $db->num_rows($threads);
 
        while (
$thread $db->fetch_array($threads))
        {
            
$bgclass exec_switch_bg(); 

Add Under:
PHP Code:

            // MarcoH64
            
if ($mod_options['portal_threads_showforum'])
            {
                
$thread['forumtitle'] = $vbulletin->datastore->registry->forumcache["$thread[forumid]"]['title_clean'];
            }
            
// /MarcoH64 

This will remove reading the forum title from the database. Instead it will be using the values that are already in the datastore (in memory, no query needed).


PS Someone could suggest this as a change in the standard vBa package since it is anyway an improvement.

Marco van Herwaarden 11-15-2005 10:45 AM

PS Next version with also translated descriptions is ready, will pack it up this afternoon if i have time.

divisortheory 11-15-2005 01:48 PM

Thank you so much Marco :) I'll take a look at it later today and let you know any feedback. Sorry I didn't get back earlier, I forgot to check the forum for a while.

Marco van Herwaarden 11-16-2005 06:44 AM

Version 1.01 released:
16-11-2005 v1.01
- Added support for translated forum descriptions
- Translations now updated when a forum is deleted.

Ramsesx 11-16-2005 01:32 PM

Great news, thank you marco, what's the best way to upgrade, uninstall the old xml file?

Marco van Herwaarden 11-16-2005 02:03 PM

Just install with Allow Overwrite set to Yes. It will upgrade nicely (i hope :D )

Ramsesx 11-17-2005 01:35 AM

Upgrade done, very easy and smart. Works great :up: :up:
Thank you very much Marco.
And if you can make the same with vb gallery and links to christmas you'll be my hero forever. :)

Marco van Herwaarden 11-17-2005 05:41 AM

Post links to the hacks you want to have modified and i will see what i can do.

PS I don't plan to go make modifications to all hacks that don't use standard vB caching.

AxEsLoCkEd 11-18-2005 03:27 PM

MarcoH64 Thanks for the hack.
My question is may you add a field to thread posting and user profile where the user can select which language they are posting in on posting or replying to a thread, and a user option where the user can select which languages they speak, like if the user chooses just german & english the user wont see french threads and if the user selects only french then they wont see the other ones :)


All times are GMT. The time now is 02:40 AM.

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.01897 seconds
  • Memory Usage 1,882KB
  • 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
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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