VERSION 1.3 - Bug fixes, XHTML compliance, plus an upgrade doc!
Hi gang,
After playing with UBB.x I had really grown accustomed to their breadcrumb line, and I just couldn't do without it in threads... so here it is!
Mod Name / Version - ThreadCrumbs 1.3
Description - This modification greatly enhances the existing breadcrumb line making it more akin to UBB.x. Iconic seperators become popup navigation menus to access other areas of the site. Also reformats and cleans up the existing breadcrumb and post navigation area maximizing space.
Files Added: * /includes/breadCrumbMenu.js * /images/globe.gif (borrowed from Infopop's UBB.x as a starting point) * /images/forumHop.gif (borrowed from Infopop's UBB.x as a starting point) * /images/hopTo.gif (borrowed from Infopop's UBB.x as a starting point)
Caveats - I had some trouble with my time and getting the scrolling of the category/forum menu working so for now, I just left that part out... if you have a LONG list of categories and forums, you will need to scroll the page yourself when you popup that menu. If I can find some more time I will try to hammer that last detail out more thoroughly...
Backup your files before doing any modifing of your code.
I am really pleased with this one, and I hope you all enjoy it!!!
Last edited by Raconteur; 04/22/20034:14 PM.
"Some dream of doing great things, while others stay awake and get on with it." -- Anonymous
I am getting this clicking on the breadcrumb thread:
SQL ERROR: Database error only visible to forum administrators PHP Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /s101/home4/syngnathids/ubbthreads/mysql.inc.php on line 157 SQL ERROR: Database error only visible to forum administrators PHP Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /s101/home4/syngnathids/ubbthreads/mysql.inc.php on line 157 SQL ERROR: Database error only visible to forum administrators PHP Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /s101/home4/syngnathids/ubbthreads/mysql.inc.php on line 157 SQL ERROR: Database error only visible to forum administrators PHP Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /s101/home4/syngnathids/ubbthreads/mysql.inc.php on line 157 SQL ERROR: Database error only visible to forum administrators PHP Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /s101/home4/syngnathids/ubbthreads/mysql.inc.php on line 157 SQL ERROR: Database error only visible to forum administrators PHP Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /s101/home4/syngnathids/ubbthreads/mysql.inc.php on line 157 SQL ERROR: Database error only visible to forum administrators PHP Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /s101/home4/syngnathids/ubbthreads/mysql.inc.php on line 157 Today's Active Topics New Since Your Last Visit ENTRANCE Announcements
I get the same thing when I go to any postlist page.
[]SQL ERROR: Database error only visible to forum administrators PHP Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /s101/home4/syngnathids/ubbthreads/mysql.inc.php on line 157 SQL ERROR: Database error only visible to forum administrators PHP Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /s101/home4/syngnathids/ubbthreads/mysql.inc.php on line 157 SQL ERROR: Database error only visible to forum administrators PHP Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /s101/home4/syngnathids/ubbthreads/mysql.inc.php on line 157 SQL ERROR: Database error only visible to forum administrators PHP Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /s101/home4/syngnathids/ubbthreads/mysql.inc.php on line 157 SQL ERROR: Database error only visible to forum administrators PHP Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /s101/home4/syngnathids/ubbthreads/mysql.inc.php on line 157 SQL ERROR: Database error only visible to forum administrators PHP Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /s101/home4/syngnathids/ubbthreads/mysql.inc.php on line 157 SQL ERROR: Database error only visible to forum administrators PHP Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /s101/home4/syngnathids/ubbthreads/mysql.inc.php on line 157[/]
I'm using WindowsXP Professional and Internet Explorer 6 (SP1)
SQL ERROR: Unable to do_query: SELECT Bo_Title, Bo_Keyword FROM w3t_Boards WHERE Bo_Cat = 1 AND () ORDER BY Bo_Sorter You have an error in your SQL syntax near ') ORDER BY Bo_Sorter ' at line 4SQL ERROR: Unable to do_query: SELECT Bo_Title, Bo_Keyword FROM w3t_Boards WHERE Bo_Cat = 2 AND () ORDER BY Bo_Sorter You have an error in your SQL syntax near ') ORDER BY Bo_Sorter ' at line 4SQL ERROR: Unable to do_query: SELECT Bo_Title, Bo_Keyword FROM w3t_Boards WHERE Bo_Cat = 3 AND () ORDER BY Bo_Sorter You have an error in your SQL syntax near ') ORDER BY Bo_Sorter ' at line 4SQL ERROR: Unable to do_query: SELECT Bo_Title, Bo_Keyword FROM w3t_Boards WHERE Bo_Cat = 4 AND () ORDER BY Bo_Sorter You have an error in your SQL syntax near ') ORDER BY Bo_Sorter ' at line 4SQL ERROR: Unable to do_query: SELECT Bo_Title, Bo_Keyword FROM w3t_Boards WHERE Bo_Cat = 5 AND () ORDER BY Bo_Sorter You have an error in your SQL syntax near ') ORDER BY Bo_Sorter ' at line 4SQL ERROR: Unable to do_query: SELECT Bo_Title, Bo_Keyword FROM w3t_Boards WHERE Bo_Cat = 6 AND () ORDER BY Bo_Sorter You have an error in your SQL syntax near ') ORDER BY Bo_Sorter ' at line 4SQL ERROR: Unable to do_query: SELECT Bo_Title, Bo_Keyword FROM w3t_Boards WHERE Bo_Cat = 7 AND () ORDER BY Bo_Sorter You have an error in your SQL syntax near ') ORDER BY Bo_Sorter ' at line 4SQL ERROR: Unable to do_query: SELECT Bo_Title, Bo_Keyword FROM w3t_Boards WHERE Bo_Cat = 8 AND () ORDER BY Bo_Sorter You have an error in your SQL syntax near ') ORDER BY Bo_Sorter ' at line 4 Today's Active Topics New Since Your Last Visit ENTRANCE News and Announcements
Okay again I say. I rehacked even though your files have your updates and this is what I get my friend.
SQL ERROR: Unable to do_query: SELECT Bo_Title, Bo_Keyword FROM w3t_Boards WHERE Bo_Cat = 1 AND () ORDER BY Bo_Sorter You have an error in your SQL syntax near ') ORDER BY Bo_Sorter ' at line 4SQL ERROR: Unable to do_query: SELECT Bo_Title, Bo_Keyword FROM w3t_Boards WHERE Bo_Cat = 2 AND () ORDER BY Bo_Sorter You have an error in your SQL syntax near ') ORDER BY Bo_Sorter ' at line 4SQL ERROR: Unable to do_query: SELECT Bo_Title, Bo_Keyword FROM w3t_Boards WHERE Bo_Cat = 3 AND () ORDER BY Bo_Sorter You have an error in your SQL syntax near ') ORDER BY Bo_Sorter ' at line 4SQL ERROR: Unable to do_query: SELECT Bo_Title, Bo_Keyword FROM w3t_Boards WHERE Bo_Cat = 4 AND () ORDER BY Bo_Sorter You have an error in your SQL syntax near ') ORDER BY Bo_Sorter ' at line 4SQL ERROR: Unable to do_query: SELECT Bo_Title, Bo_Keyword FROM w3t_Boards WHERE Bo_Cat = 5 AND () ORDER BY Bo_Sorter You have an error in your SQL syntax near ') ORDER BY Bo_Sorter ' at line 4SQL ERROR: Unable to do_query: SELECT Bo_Title, Bo_Keyword FROM w3t_Boards WHERE Bo_Cat = 6 AND () ORDER BY Bo_Sorter You have an error in your SQL syntax near ') ORDER BY Bo_Sorter ' at line 4SQL ERROR: Unable to do_query: SELECT Bo_Title, Bo_Keyword FROM w3t_Boards WHERE Bo_Cat = 7 AND () ORDER BY Bo_Sorter You have an error in your SQL syntax near ') ORDER BY Bo_Sorter ' at line 4SQL ERROR: Unable to do_query: SELECT Bo_Title, Bo_Keyword FROM w3t_Boards WHERE Bo_Cat = 8 AND () ORDER BY Bo_Sorter You have an error in your SQL syntax near ') ORDER BY Bo_Sorter ' at line 4 Today's Active Topics New Since Your Last Visit ENTRANCE News and Announcements
Obviously something different as either the code is a bit different on your site or we have another little problem.
Here is the section of code where you are inputing the AND ()
Code
// ------------------------------------------------------------------- <br />// We need to format a SQL query to see what boards this user can view <br /> $Grouparray = split("-",$Groups); <br /> $gsize = sizeof($Grouparray); <br /> $groupquery = "AND ("; <br /> $g = 0; <br /> for ($i=0; $i<$gsize;$i++) { <br /> if (!preg_match("/[0-9]/",$Grouparray[$i])) { continue; }; <br /> $g++; <br /> if ($g > 1) { <br /> $groupquery .= " OR "; <br /> } <br /> $groupquery .= "Bo_Read_Perm LIKE '%-$Grouparray[$i]-%'"; <br /> } <br /> $groupquery .= ")"; <br /> <br /> $query = " <br /> SELECT Cat_Title, Cat_Number <br /> FROM {$config['tbprefix']}Category <br /> ORDER BY Cat_Number <br /> "; <br /> <br /> $allCats = $dbh -> do_query($query); <br /> $catMenu = " <br /> <table border=\"1\" class=\"tdheader\"> <br /> <tr> <br /> <td class=\"alterline\"><font size=\"1\"><a href=\"{$config['homeurl']}/index.php?Cat=\"><b>ENTRANCE</b></a></font></td> <br /> </tr> <br /> "; <br /> <br /> while (list($theCat, $theCatNum) = $dbh -> fetch_array($allCats)) { <br /> <br /> $query = " <br /> SELECT Bo_Title, Bo_Keyword <br /> FROM {$config['tbprefix']}Boards <br /> WHERE Bo_Cat = {$theCatNum} {$groupquery} <br /> ORDER BY Bo_Sorter <br /> ";
Ok... have you modified the group assignment stuff at all? By default a user should be placed into group 4... basically what is happening is there are no groups for the user that is looking....
"Some dream of doing great things, while others stay awake and get on with it." -- Anonymous
Look in ubbthreads.php on line 51 (or do a case-sensitive search for "$Groups"). You will see $Groups gets assigned there... then on line 97, you will see if they are a Guest, the get assigned to group "-4-".
So, at the very least: Guests = group "-4-" Users = group "-3-" Moderators = group "-2-" Admins = group "-1-"
These get combined for various assignments, like a mod who is an admin would be in group "-1-2-"
What it looks like is that users are not getting assigned to groups... try adding this:
Code
<br />echo "GROUPS = $Groups<p>";<br />
to the getCatBreadCrumbMenu function in ubbt.inc.php. Then go to the page and see if the var is getting populated.
"Some dream of doing great things, while others stay awake and get on with it." -- Anonymous
My groups are defined in the MYSQL TABLE Each user is assigned to a group. I see your using the same code as in the ubbthreads.php file. However the AND () does not work for some reason. when I take out that from the code it works.
Now can you get clickable images with the forums like your site on mine cause I can not?
SQL ERROR: Unable to do_query: SELECT Bo_Title, Bo_Keyword FROM w3t_Boards WHERE Bo_Cat = 1 AND (t1.Bo_Read_Perm LIKE '%-3-%' OR t1.Bo_Read_Perm LIKE '%-1-%' OR t1.Bo_Read_Perm LIKE '%-2-%') ORDER BY Bo_Sorter Unknown table 't1' in where clauseSQL ERROR: Unable to do_query: SELECT Bo_Title, Bo_Keyword FROM w3t_Boards WHERE Bo_Cat = 2 AND (t1.Bo_Read_Perm LIKE '%-3-%' OR t1.Bo_Read_Perm LIKE '%-1-%' OR t1.Bo_Read_Perm LIKE '%-2-%') ORDER BY Bo_Sorter Unknown table 't1' in where clauseSQL ERROR: Unable to do_query: SELECT Bo_Title, Bo_Keyword FROM w3t_Boards WHERE Bo_Cat = 3 AND (t1.Bo_Read_Perm LIKE '%-3-%' OR t1.Bo_Read_Perm LIKE '%-1-%' OR t1.Bo_Read_Perm LIKE '%-2-%') ORDER BY Bo_Sorter Unknown table 't1' in where clauseSQL ERROR: Unable to do_query: SELECT Bo_Title, Bo_Keyword FROM w3t_Boards WHERE Bo_Cat = 4 AND (t1.Bo_Read_Perm LIKE '%-3-%' OR t1.Bo_Read_Perm LIKE '%-1-%' OR t1.Bo_Read_Perm LIKE '%-2-%') ORDER BY Bo_Sorter Unknown table 't1' in where clauseSQL ERROR: Unable to do_query: SELECT Bo_Title, Bo_Keyword FROM w3t_Boards WHERE Bo_Cat = 5 AND (t1.Bo_Read_Perm LIKE '%-3-%' OR t1.Bo_Read_Perm LIKE '%-1-%' OR t1.Bo_Read_Perm LIKE '%-2-%') ORDER BY Bo_Sorter Unknown table 't1' in where clauseSQL ERROR: Unable to do_query: SELECT Bo_Title, Bo_Keyword FROM w3t_Boards WHERE Bo_Cat = 6 AND (t1.Bo_Read_Perm LIKE '%-3-%' OR t1.Bo_Read_Perm LIKE '%-1-%' OR t1.Bo_Read_Perm LIKE '%-2-%') ORDER BY Bo_Sorter Unknown table 't1' in where clauseSQL ERROR: Unable to do_query: SELECT Bo_Title, Bo_Keyword FROM w3t_Boards WHERE Bo_Cat = 7 AND (t1.Bo_Read_Perm LIKE '%-3-%' OR t1.Bo_Read_Perm LIKE '%-1-%' OR t1.Bo_Read_Perm LIKE '%-2-%') ORDER BY Bo_Sorter Unknown table 't1' in where clauseSQL ERROR: Unable to do_query: SELECT Bo_Title, Bo_Keyword FROM w3t_Boards WHERE Bo_Cat = 8 AND (t1.Bo_Read_Perm LIKE '%-3-%' OR t1.Bo_Read_Perm LIKE '%-1-%' OR t1.Bo_Read_Perm LIKE '%-2-%') ORDER BY Bo_Sorter Unknown table 't1' in where clause Today's Active Topics New Since Your Last Visit ENTRANCE Coral Propagation Reefs
Yep I got it working now. Except on thing. You posted you updated the original file with the update.
The global call fixed it adding $Groups that is. You might want to update the instructions.
Do me one favor try seeing if the image menu's build for you. They are not for me? So there is now another problem that has been there from the start. We have the SQL error working now on to the actual images. On your site when you click those images the forums list because thats what you want to do. Mine are dead.
Okay so any ideas about the build menu java script. I have it installed as you say yet my menu's are dead. Yours are not so since I can click and your site works I know its not a java error on my end so is there a step missing?
Also... you are using my class "alterline" for the <td> tags in the menus. You either need to change this to something like "tdheader" or make your own "alterline"
In an effort to make this more accessible to people and hopefully more downloadable, would anyone benefit from it being a user-option set from My Home to turn on "Enhanced Bread Crumbs" (i.e. this mod) or leave the original in tact?
"Some dream of doing great things, while others stay awake and get on with it." -- Anonymous
On thing I noticed though about this mod even though I like it is that it is not XHTML compliant. I have made some changes to make it such and will sent them to you.
Yes but you did such a wonderful job. I remember the thread over at Infopop with you asking for a copy of the constructor. You took it upon yourself to do what ya had to do and you got the job done. You can't ask for anything better. Clean up issues always come up after a release.
[]omegatron said: LOL I am real big on compliance. I kinda let that be my little nitch. I like to nitpick. What would you expect from a perfectionist. [/]
Please continue to do so! The more standard compliant a site’s scripting the better it will work with all browsers. If it doesn't work with a particular browser then it's up to the people who code the browser to make it work
<font size="1"><a href="javascript:void(0);" onclick="showMenu('globeMenu',this.id,20,5);event.cancelBubble=true" id="globeCrumb"><img src="{$config['imageurl']}/globe.gif" border="0" align="middle" alt="Today's Active Topics and New Since Last Visit" /></a> <a href="{$config['phpurl']}/ubbthreads.php?Cat=">{$config['title']}</a></font>
Change it to this:
<tr><td colspan=5" class="tdheader"> <font size="1"><a href="javascript:void(0);" onclick="showMenu('globeMenu',this.id,20,5);event.cancelBubble=true" id="globeCrumb"><img src="{$config['imageurl']}/globe.gif" border="0" align="middle" alt="Today's Active Topics and New Since Last Visit" /></a> <a href="{$config['phpurl']}/ubbthreads.php?Cat=">{$config['title']}</a></font> </td></tr>
I also changed the alterline class on the classes in ubbt.inc.php since on most stylesheets this is a bit vague a color. I made them darktable to see better.
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.