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)

o0stephane0o 04-07-2003 10:49 AM

You should do the following i think but backup your database in case it messes it up..
Create a new template called index_custom3 with the same content as the previous 2.
then modify the myvbindex.php file like that:
look for:
PHP Code:

// Custom Boxes
$custom1 '';
$custom2 '';
if (
$showcustom1) {
  
$getbgrow getrowcolor();
  eval(
"\$custom1 = \"".gettemplate('index_custom1')."\";");
}
if (
$showcustom2) {
  
$getbgrow getrowcolor();
  eval(
"\$custom2 = \"".gettemplate('index_custom2')."\";");
}
  
Replace by:

// Custom Boxes
$custom1 '';
$custom2 '';
$custom3 '';
if (
$showcustom1) {
  
$getbgrow getrowcolor();
  eval(
"\$custom1 = \"".gettemplate('index_custom1')."\";");
}
if (
$showcustom2) {
  
$getbgrow getrowcolor();
  eval(
"\$custom2 = \"".gettemplate('index_custom2')."\";");
}
if (
$showcustom3) {
  
$getbgrow getrowcolor();
  eval(
"\$custom3 = \"".gettemplate('index_custom3')."\";");


And then execute the following sql request:

$DB_site->query("INSERT INTO setting VALUES (NULL,50,'Show Custom Template 3?','showcustom3','0','Show your third customized template.','yesno','30');");

Then put in your myvbindex.php $custom3 wherever you?d like your third custom template to be.

I haven?t tested it but i guess it should work.
I repeat again, backup before doing any changes...

Let me know how it went..

o0stephane0o 04-07-2003 09:51 PM

Tigga, i still have the same problem with the weather hack,
Warning: fsockopen() [function.fsockopen]: php_hostconnect: connect failed in /home/psx4gued/public_html/forum/index.php on line 389

Warning: fsockopen() [function.fsockopen]: unable to connect to www.msnbc.com:80 in /home/psx4gued/public_html/forum/index.php on line 389

any idea how to solve it?

Tigga 04-08-2003 12:31 AM

attroll - Yes. Assuming you wanted to do this to your Custom 1 template, here is what you would do... Open your myvbindex.php file and look for:
PHP Code:

if ($showcustom1

Change that to:
PHP Code:

if ($showcustom1 AND $bbuserinfo[usergroupid]==6) { 

Amongthethugs - You would just change your News Forum ID (first option under the myvbindex opts) to 3 or forumid=8
As for creating more custom templates, see the instructions in this post.

o0stephane0o - As for changing the date format, there are 3 places in the myvbindex.php file you should look for:
PHP Code:

    $thread['date'] = vbdate("m-d-y $timeformat"$thread['dateline']); 

PHP Code:

  $dateposted vbdate("M d, Y - g:i A",$news['dateline']); 

PHP Code:

  $lastvisit vbdate("m-d-y g:i a"$bbuserinfo['lastvisit']); 

You should be able to change the date format in those three places, and if there are any I've forgotten let me know.
As for the weather... What version of myvbindex are you running? Have you tried applying both of the fixes listed in JJR512's thread? If those don't work, please post here or PM me with a link to your site.

o0stephane0o 04-08-2003 10:05 AM

Ok great, I just want to change the language of the date and time, I mean, instaed of 8th April something like 8 de Abril or 8 avril...
I have installed the v3.2 and it still not working but i will try on another server in case the problem is due to the actual one.

Intex 04-12-2003 04:31 PM

Tigga - quick question:

I'd like to have one of the news items posted stuck at the top. This would be for a general website introduction that will always appear there, then other news posts below. Is this possible without altering the database date / time post for that thread everytime a new news post is created that would take priority position?

Thx.

Tigga 04-12-2003 05:14 PM

Intex - Yes, it is possible to have "sticky" news posts. Just open your myvbindex.php file and look for:
PHP Code:

ORDER BY thread.threadid DESC $newsmax"); 

Replace that with:
PHP Code:

ORDER BY sticky DESC,thread.threadid DESC $newsmax"); 


PKRWUD 04-12-2003 05:30 PM

I used one of the custom templates to put an item there.

Speaking of which, how do we add more custom templates? I know how to make the template, but the control panel only has options for two. Is there a way to add more?

Tigga 04-12-2003 05:37 PM

Yup, see this post. ;)

PKRWUD 04-12-2003 05:44 PM

You're the best!

Intex 04-13-2003 11:35 AM

Thx Tigga :).


Quote:

Yesterday at 07:08 PM Tigga said this in Post #1056
Intex - Yes, it is possible to have "sticky" news posts. Just open your myvbindex.php file and look for:
PHP Code:

ORDER BY thread.threadid DESC $newsmax"); 

Replace that with:
PHP Code:

ORDER BY sticky DESC,thread.threadid DESC $newsmax"); 




All times are GMT. The time now is 04:07 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.02036 seconds
  • Memory Usage 1,765KB
  • 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
  • (10)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
  • (6)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