vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   vBindex v3.0.0 RC5 (https://vborg.vbsupport.ru/showthread.php?t=59524)

NTLDR 04-03-2004 04:20 PM

Quote:

Originally Posted by gmarik
What custom blocks are you planning to add in the future as an option? Maybe something like vb portal affiliate box?

None currently, although I'm sure more options and features will be added to them. At the moment its possible for users to easily add content to them due to the dynamic nature introduced in vBindex 3.0.0 RC4.

Bulent Tekcan 04-03-2004 06:27 PM

Quote:

Originally Posted by turkeyforum
How can I uninstall this hack ? Also when I upgrade my board any problem future ?

Because add everywhere a lot of style and phrases.

Can I unistall this hack ???


Any comment ???

snyx 04-03-2004 09:46 PM

I can't seem to change the navbar background in the index -> nav template. I sware I have done everything possible. its not my paths they have all been corrected (hense the red gradients in the sample). anyone guide me?

killervette 04-03-2004 10:34 PM

Here is the gallery code I want to include at the bottom of the vbindex page. I want it centered like the centered latest threads page. I dont know much php. Can anyone help me and tell me where to put it please?

//++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++ +++++++++++++++++++

echo("<table bgcolor=\"#F7F7F7\" width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"3\"> ");
echo("<tr> ");
echo("<td valign=\"top\" bgcolor=\"CC0000\"><font face=\"verdana, arial, helvetica\" size=\"2\" class=\"nf\" color=\"#FFFFFF\"> <b>Latest ");
echo("Gallery Images - ");

$dbusername="";
$password="";
$database=""
mysql_connect(localhost,$dbusername,$password);
@mysql_select_db($database) or die( "Unable to select database");

$query = "SELECT * FROM photos WHERE approved='1'";
$result=mysql_query($query);
$numrows=mysql_num_rows($result);

echo ("$numrows Photos and Counting");


echo("</b></font></td>");
echo("</tr>");
echo("<tr>");
echo("<td bgcolor=#F7F7F7><div align=center>");
echo("<p><font size=1 face=Geneva>");


////////////////////////////////////////////////////////////////////////////
// thumbincluder.php version 1.1
// A thumbnail includer for your non-photopost page
// Tested with Photopost PHP version 3.0.4
////////////////////////////////////////////////////////////////////////////
//1.0 first release
//1.1 included remote functions for standalone operation
// please note database hooks and paths are required in settings below.
////////////////////////////////////////////////////////////////////////////
// July 13, 2002 Here is a hacked-up version of photoinclude.php that has
// been merged with a hacked-up version of index.php and a hacked-up version of
// display_gallery by a guy on two quarts of caffeine at 3:40 AM, oh,
// and did I mention it was his first php programming experiment ever?
//
// If that didn't scare you enough: BACK UP YOUR DATABASE NOW!
//
// This file goes in your photopost php directory with all the other files
// Then configure Display Settings below as desired.
//
// NOTES:
// Please note that the prior typo "lastest" has been fixed, so the valid
// switches are random, most_views (plural) and latest (spelled correctly)
//
// If you liked this hack, email me a link to your photopost so I can learn
// something from your layout too!
//
// Live long and prosper - Matt Chroust (memobug@spamcop.net)
//
//////////////////////////// COPYRIGHT NOTICE //////////////////////////////
// This script is part of PhotoPost PHP, a software application by //
// All Enthusiast, Inc. Use of any kind of part or all of this //
// script or modification of this script requires a license from All //
// Enthusiast, Inc. Use or modification of this script without a license //
// constitutes Software Piracy and will result in legal action from All //
// Enthusiast, Inc. All rights reserved. //
// http://www.photopost.com legal@photopost.com //
// Contributing Developer: Michael Pierce (danasoft.com) //
// //
// PhotoPost Copyright 2002, All Enthusiast, Inc. //
////////////////////////////////////////////////////////////////////////////



// ************************************************** ***********************
// ************************************************** ***********************
//PhotoPost Setting
//You must change these values in order to run this script

$Url_Path = "http://www.ifitsfast.com/photogallery/"; //URL of your photo album, where the index.php is (with / at end)
$data_dir = "http://www.ifitsfast.com/photogallery/data/" ; //URL of your photo dir where those jpeg stored (with / at end)
$images_dir =$Url_Path."../images/"; //URL of your photopost images dir where default missing thumb image is stored (with / at end)
$rel_dir = "../photogallery/data/"; // path to the data directory where pictures reside RELATIVE
// to the location of THIS file (used for checking thumbs)
//Database Setting
//You must change these values in order to run this script
//These value are not visible in the output page source

$host = ""; //Server Name
$user= ""; //Username
$password= ""; //Password
$database=""; //Photopost database name or forum database name

//Display Setting (Changes to fit your page)
$q_switch = "latest"; // "random" or "most_views" or "latest"
$limit = 8; //number of image to show
$table_width = "65%"; //width of the table generated
$column = 4; //number of columns of the table generated
$photo_cell_align = "center"; //alignment of those cells

// CSS Setting (optional)
$class_link = ""; //css for link, leave blank if none
$class_table = ""; //css for table, leave blank if none
$class_mouseover = ""; //color when mouse over the photo cell, leave blank if to cancel

// ************************************************** ***********************
// ************************************************** ***********************

///////////don't edit below this line if you are too afraid to kill the code//////////////
// ---------------------- THESE FUNCS FROM pp-inc -----------------

function mysql_query_eval( $query, $database ) {
global $Globals;

$mysql_eval_error="";
$mysql_eval_result = mysql_query($query, $database) or $mysql_eval_error = mysql_error();
if ($mysql_eval_error) {
if ( $Globals{'debug'} == 1 ) {
$letter = "An error was encountered during execution of the query:\n\n";
$letter .= $query."\n\n";
$letter .="The query returned with an errorcode of: \n\n$mysql_eval_error\n\n";
$letter .= "If you need assistence or feel this is a 'bug'; please report it to our ";
$letter .= "support forums at: http://www.techimo.com/forum/f27/index.html\n\n";
$letter .= "To turn off these emails, set \$debug=0 in your config-inc.php file.";

$email = $Globals{'adminemail'};
$email_from = "From: ".$Globals{'adminemail'};

$subject="Subject: ".$Globals{'webname'}." MySQL Error Report";
$subject=trim($subject);

mail( $email, $subject, $letter, $email_from );
}
elseif ( $Globals{'debug'} == 2 ) {
dieWell( "MySQL error reported!<p>Query: $query<p>Result: $mysql_eval_error<p>Database handle: $database" );
exit;
}
return FALSE;
}
else {
return $mysql_eval_result;
}
}

function get_ext( $filename ) {
$photolen = strlen($filename);
$RetVal = substr( $filename, $photolen-3, $photolen);

return $RetVal;
}

function get_filename($filename) {
// strip off the last 4
$len = strlen( $filename )-4;
$RetVal = substr( $filename, 0, $len);
return $RetVal;
}


// ---------------------- THESE FUNCS FROM pp-inc -----------------
// Connecting, selecting database
$link = mysql_connect ("$host", "$user", "$password") or die ('I cannot connect to the database.');
mysql_select_db ("$database")or die("Could not select database");

// Here is the hacked up display_gallery($q_switch)

$catquery="";

if ( IsSet($cat) ) {
$querya="SELECT catname FROM categories WHERE id=$cat";
$catq = mysql_query_eval($querya,$link);
$catr = mysql_fetch_array($catq);
$catname = $catr['catname'];
mysql_free_result($catq);


$queryb = "SELECT id FROM categories WHERE parent='$cat' ORDER BY catorder ASC";
$boards = mysql_query_eval($queryb,$link);
$cnt=0;
while ( $row = mysql_fetch_array($boards, MYSQL_ASSOC)) {
$catqid = $row['id'];
if ( $cnt == 0 ) {
$cnt=1;
$catquery .= "$catqid";
}
else {
$catquery .= ",$catqid";
}
}
mysql_free_result($boards);
}



// Connecting, selecting database

// Selecting method and Perform SQL query


switch ($q_switch) {
case "most_views":
if ( !IsSet($cat) ) {
$group_title = "Most Popular Images - All Categories";
$query = "SELECT id,user,userid,cat,title,bigimage,views FROM photos WHERE bigimage!='' AND approved='1' $exclude_cat ORDER BY views DESC LIMIT $limit";
}
else {
$query = "SELECT id,user,userid,cat,title,bigimage,views FROM photos WHERE bigimage!='' AND approved='1' $exclude_cat AND cat in ($catquery) ORDER BY views DESC LIMIT $limit";
$group_title = "Most Popular Images - $catname";
}
break;
case "latest":
if ( !IsSet($cat) ) {
$group_title = "Most Recent Images - All Categories";
$query = "SELECT id,user,userid,cat,title,bigimage,views FROM photos WHERE bigimage!='' AND approved='1' $exclude_cat ORDER BY date DESC LIMIT $limit";
break;
}
else {
$group_title = "Most Recent Images - $catname";
$query = "SELECT id,user,userid,cat,title,bigimage,views FROM photos WHERE bigimage!='' AND approved='1' $exclude_cat AND cat in ($catquery) ORDER BY date DESC LIMIT $limit";
break;
}
break;
default:
if ( !IsSet($cat) ) {
$group_title = "Random Images - All Categories";
$query = "SELECT id,user,userid,cat,title,bigimage,views FROM photos WHERE bigimage!='' AND approved='1' $exclude_cat ORDER BY RAND() DESC LIMIT $limit";
break;
}
else {
$group_title = "Random Images - $catname";
$query = "SELECT id,user,userid,cat,title,bigimage,views FROM photos WHERE bigimage!='' AND approved='1' $exclude_cat AND cat in ($catquery) ORDER BY RAND() DESC LIMIT $limit";
break;
}
break;
}


$i = 1;
$e = 2;
$col_val = $column;
$result = mysql_query_eval($query,$link) or die("Query failed");
print "<table class=\"".$class_table."\" width=\"".$table_width."\"><tr>";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
$photo_name = get_filename( $line['bigimage'] );
print "<td onmouseover=this.style.background='".$class_mouseo ver."' onmouseout=this.style.background='' align=\"center\">";
$theext = get_ext( $line['bigimage'] );
$thecat = $line['cat'];
$temp_user = ($line["userid"]);
$filepath = "$data_dir"."$thecat/$temp_user$photo_name-thumb.$theext";
$rel_path = "$rel_dir"."$thecat/$temp_user$photo_name-thumb.$theext";
print "<A class=\"$class_link\" href=\"$Url_Path"."showphoto.php?photo=".$line['id']. "\">";
if ( file_exists( $rel_path ) )
print "<img border=\"0\" src='$filepath'>";
else
print "<img border=\"0\" src='".$images_dir."nothumb.gif' alt='$filepath'>";
print "<Font size=\"1\"color=\"".$Globals{'maintext'}."\" face=\"verdana,arial\">\n";
if ($q_switch == "most_views") {
print "<br>".$line["title"]."<br>".$line["views"]." views";
print "</a><br></font></div><br>";
} else {
print "<br>".$line["title"];
print "</a><Br>by ".$line["user"]."</font></div><br>";
}
if ($i == "$column") {
print "</td></tr><tr>";
$column = $col_val*$e;
$e++;
} else {print "</td>";}
$i++;
}

print "</tr></table>";

// Closing connection
mysql_close($link);
// mysql_close($db_link);


echo("</font></p>");
echo("</div></td>");
echo("</tr>");
echo("</table>");

//++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++ +++++++++++++++++++

NTLDR 04-04-2004 06:04 PM

Quote:

Originally Posted by snyx
I can't seem to change the navbar background in the index -> nav template. I sware I have done everything possible. its not my paths they have all been corrected (hense the red gradients in the sample). anyone guide me?

vBindex uses a different navbar template (vbindex_navbar) if you have edited the standard vB one you need to edit this too. The blue should be one of the vB Menu CSS classes towards the bottom.

weaver 04-05-2004 12:02 AM

Quote:

The new style only works with vBindex 3.0.0 RC4 and above, if you have an older version you can copy the edited calendar_ and vbindex_calendar templates from the vbindex_templates.xml file.

If your using RC4/5 and it doesn't appear like that then the templates will be listed as templatename__3.0.0_RCX in the ACP for you to update your customised ones from.
I had the same issue with previously customized templates. What do I do with the template included with this install? Do I copy and paste the code into my customized templates?

I've also noticed that "Members Online Today" shows ALL of my users which I know is not correct. That is also happening on the main page of my Admin CP. It's showing ALL posts and threads as new today.

One last thing, and I think it's related to the calendar template issue I'm having, but when I click on "April" on my calendar it's adding the beginning of my site url twice which is causing a "page cannot be found" error.

neocorteqz 04-05-2004 03:34 AM

Quote:

Originally Posted by chas_h
The code works fine, and makes the weather block but when you click on it you are taken to the user CP to add your zip code and I don't see a place for that. Any ideas?

Thanks.

For those who do want to know though. pretty simple, just make a new custom userfield (Either in options, really any place you want though), and in the code wherever it says $bbuserinfo[field5], change the code to whatever the relevent field number is (ie mine is field8). i even made this part of the registration option so they may imput it at registration. Hidden from viewing though. :0

NTLDR 04-05-2004 08:16 AM

Quote:

Originally Posted by snobbymom
I had the same issue with previously customized templates. What do I do with the template included with this install? Do I copy and paste the code into my customized templates?

You should overwrite or compare the default vBindex ones with your customised ones to make sure all the features are avalible to you.

Quote:

I've also noticed that "Members Online Today" shows ALL of my users which I know is not correct. That is also happening on the main page of my Admin CP. It's showing ALL posts and threads as new today.
If it happens in the ACP too then its probably some problem with vBulletin itself.

AlexanderT 04-05-2004 10:30 AM

NTLDR,

Is there any reason why you moved the headinclude/navbar/pm_popup_scripts templates out to vbindex_headinclude/navbar/pm_popup_scripts, since RC4? The problem I see is that whenever Jelsoft releases an upgrade with changes in those templates, one must apply the changes twice (normal and vbindex_headinclude/navbar/pm_popup_scripts).

D|ver 04-05-2004 10:38 AM

has anyone an idea how to create a custom box which include today's events?

i tried to include the code vom the vbulletin index.php for the next 5 days events, but without success ;(
but i think, that a "show today's events box" would be really great :)


All times are GMT. The time now is 02:27 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.03426 seconds
  • Memory Usage 1,802KB
  • 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
  • (7)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