Previous Thread
Next Thread
Print Thread
Rating: 5
Page 8 of 11 1 2 6 7 8 9 10 11
Joined: Jan 2003
Posts: 263
Member
Member
Joined: Jan 2003
Posts: 263
Thanks for the quick reply Josh!

Unfortunately this does not solve my problem... showing descriptions from subcategories

Sponsored Links
Joined: Jan 2002
Posts: 674
Junior Member
Junior Member
Offline
Joined: Jan 2002
Posts: 674
ty

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Ah - actually I didn't know the answer to your question - I just used quick reply to post my code mod.

Joined: Apr 2002
Posts: 610
Code Monkey
Code Monkey
Joined: Apr 2002
Posts: 610
SEO Friendly URLs would sure be nice....

If anyone can make this happen....$$$$

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
I did it for you.

Wasn't easy - had to edit pretty much every link thoughout the whole thing.

Sponsored Links
Joined: Apr 2002
Posts: 610
Code Monkey
Code Monkey
Joined: Apr 2002
Posts: 610

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Any place current code (with bugfixes, etc) can be found?


- Allen wavey
- What Drives You?
Joined: Nov 2000
Posts: 210
Member
Member
Offline
Joined: Nov 2000
Posts: 210
Further back in the list I redid it and posted my changes in an attachment. My updates were to make it work with register globals off... There is still some bugs with the way it uses category descriptions which I do not use so I did not look deep into them...

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
ok, thank you


- Allen wavey
- What Drives You?
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
OK- to make this work with 6.5.

In links_admin.php and links_redirect.php change this:

require ("main.inc.php");


To this:

require ("./includes/main.inc.php");


And in links.php you need to change this:


require ("main.inc.php");
require ("links/languages/${$config['cookieprefix']."w3t_language"}/links.php");


To this:

require ("./includes/main.inc.php");
require ("languages/{$myprefs['language']}/links.php");

Sponsored Links
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
thanks for the fixes


- Allen wavey
- What Drives You?
Joined: Aug 2000
Posts: 1,290
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,290
Anyone have problems getting sub categories to work? I enter em, but they show as main cats.


- Custom Web Development
http://www.JCSWebDev.com
Joined: Sep 2003
Posts: 803
Coder
Coder
Offline
Joined: Sep 2003
Posts: 803
[]http://www.leetgamers.org/images/graemlins/kid_rofl.gif[/]


edit.
I swear I thought he was talking about subforums in threads.DOH!

Last edited by DrChaos; 07/07/2004 8:54 AM.
Joined: Aug 2000
Posts: 1,290
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,290
Got it fixed. Thanks MattyJ!


- Custom Web Development
http://www.JCSWebDev.com
Joined: May 1999
Posts: 241
Coder
Coder
Offline
Joined: May 1999
Posts: 241
Not a problem... glad that cleared it up!


--------------------
Matt Reinfeldt
http://www.mattreinfeldt.com/
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
what? something you might wanna share?


- Allen wavey
- What Drives You?
Joined: May 1999
Posts: 241
Coder
Coder
Offline
Joined: May 1999
Posts: 241
Allen,

actually, I just sent him copies of my files... I'm pretty sure there was some fix I did a while ago to the links_show_cat.php file that enabled the sub-cats showing on the main index.... but it was so long ago, it was easier for me just to send JC my files.

You can see what mine looks like at http://www.mattreinfeldt.com/

hth.


--------------------
Matt Reinfeldt
http://www.mattreinfeldt.com/
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
I see


- Allen wavey
- What Drives You?
Joined: Jul 2003
Posts: 46
Junior Member
Junior Member
Offline
Joined: Jul 2003
Posts: 46
I just installed Links v1.5 to my UBB.Threads v6.4, and I am having the same problem that Pasqualist had. What I don't understand is, what do you mean by "Your tables do not exist try these through phpmyadmin"? How or where do I find this phpmyadmin?

[]Omegatron said:
Your tables do not exist try these through phpmyadmin

CREATE TABLE `w3t_links_categories` (
`cat_id` int(11) NOT NULL auto_increment,
`parent_id` int(11) default NULL,
`title` varchar(50) NOT NULL default '',
`cat_order` tinyint(10) NOT NULL default '0',
`cat_desc` varchar(60) default NULL,
PRIMARY KEY (`cat_id`)
) TYPE=MyISAM AUTO_INCREMENT=0 ;

CREATE TABLE `w3t_links_favorites` (
`num` int(9) unsigned NOT NULL auto_increment,
`lid` int(9) unsigned NOT NULL default '0',
`uid` int(9) unsigned NOT NULL default '0',
PRIMARY KEY (`num`),
KEY `FAV_indx1` (`uid`)
) TYPE=MyISAM AUTO_INCREMENT=0 ;

CREATE TABLE `w3t_links_links` (
`lid` int(11) NOT NULL auto_increment,
`cat_id` int(11) default NULL,
`approved` tinyint(4) NOT NULL default '1',
`title` varchar(100) NOT NULL default '',
`url` varchar(100) NOT NULL default '',
`description` text NOT NULL,
`date_added` int(11) unsigned NOT NULL default '0',
`name` varchar(100) NOT NULL default '',
`email` varchar(100) NOT NULL default '',
`hits` int(11) NOT NULL default '0',
`user_number` int(11) NOT NULL default '0',
`member` char(2) NOT NULL default '',
`linkratingsummary` double(6,4) NOT NULL default '0.0000',
`totalvotes` int(11) NOT NULL default '0',
PRIMARY KEY (`lid`)
) TYPE=MyISAM AUTO_INCREMENT=0 ;

I dumped these from my working install [/]

Joined: May 1999
Posts: 241
Coder
Coder
Offline
Joined: May 1999
Posts: 241
Bob,

there are different ways of accessing your MySQL tables, it just depends on your host and how it's all set up. On all the sites I run, I am able to access phpmyadmin from the cpanel. If you can't find it there, you can download it from http://www.phpmyadmin.net/home_page/ and follow the installation instructions. Make sure to put some security controls on the directory you install it to, though (.htaccess file). Or you can go download MySQL-Front 2.5 from http://www.bumpersoft.com/Programming/Databases_and_Networks/Review_982_index.htm (you have to allow remote access to the database to get this to work...). Either one will work for you. There are other options as well, I'm sure. Those are just the two most convenient ones for me.


--------------------
Matt Reinfeldt
http://www.mattreinfeldt.com/
Joined: Jul 2003
Posts: 46
Junior Member
Junior Member
Offline
Joined: Jul 2003
Posts: 46
Thank You MattyJ!

Joined: Oct 2001
Posts: 27
User
User
Joined: Oct 2001
Posts: 27
Isn't the lastest and greatest release of this mod supposed be included in the first post. I thought that was the protocol. I am having the same issue where adding sub categories become catagories. Does anyone have the fix?

Joined: May 1999
Posts: 241
Coder
Coder
Offline
Joined: May 1999
Posts: 241
no reason us admins shouldn't see this as well... so, in links_admin.php, change the edit_link function to be the following:
Code
<br />function edit_link() {<br />    GLOBAL $lid,$dbh,$config;<br />                <br />    $query = "<br />       SELECT *<br />       FROM {$config['tbprefix']}links_links<br />       WHERE lid = '$lid'<br />    ";<br />    $result = $dbh -> do_query($query);<br />    $row = mysql_fetch_assoc($result);<br />    $tCatId = $row['cat_id'];<br />    $query = "<br />	SELECT title<br />	FROM {$config['tbprefix']}links_categories<br />	WHERE cat_id = '{$tCatId}'<br />    ";<br />    $mth = $dbh -> do_query($query);<br />    list($tTitle) = $dbh -> fetch_array($mth); <br />    $dbh -> finish_sth($mth);<br />    $query = "SELECT * FROM {$config['tbprefix']}links_categories WHERE parent_id = 0 ORDER BY title";<br />    $main_cat = $dbh -> do_query($query);<br />    $total_main_cats = mysql_num_rows($main_cat);<br />    $cat_pulldown = "<select size=\"1\" name=\"cat_id\"> \n <option selected value=\"{$tCatId}\">{$tTitle}</option> \n";<br />    for ($y= 0; $y < $total_main_cats; $y++) {<br />	$cat_row = mysql_fetch_assoc($main_cat);<br />	$cat_pulldown .= "<option value=\"{$cat_row['cat_id']}\">&bull;{$cat_row['title']}</option> \n";<br />	$query = "SELECT * FROM {$config['tbprefix']}links_categories WHERE parent_id = '{$cat_row['cat_id']}' ORDER BY title";<br />	$links_cat = $dbh -> do_query($query);<br />	$total_cats = mysql_num_rows($links_cat);<br />	for ($x= 0; $x < $total_cats; $x++) {<br />		$results = mysql_fetch_assoc($links_cat);<br />		$cat_pulldown .= "<option value=\"$results[cat_id]\">&nbsp;-{$results['title']}</option>\n";<br />	}<br />    }<br />    $cat_pulldown .= "</select>";<br /><br />    print "<br />        <form action=\"links_admin.php?op=process_edit_link\" method=\"POST\"><br />        <input type=\"hidden\" name=\"lid\" value=\"$lid\"><br />        <table border=\"0\" cellpadding=\"2\" cellspacing=\"2\"><br />        <tr><td align=\"right\"><b>Select Category:</b></td><br />        <td><br />	$cat_pulldown<br />    ";<br />    print "<br />        </td><br />        </tr><br />        <tr><td align=\"right\"><b>URL:</b></td><td><input name=\"url\" size=\"40\" value=\"$row[url]\" /><br />        </td></tr><br />        <tr><td align=\"right\"><b>Title:</b></td><td><input name=\"title\" size=\"40\" value=\"$row[title]\" /><br />        </td></tr><br />        <tr><td align=\"right\"><b>Description:</b></td><td><textarea name=\"description\" rows=\"3\" cols=\"40\">$row[description]<br />        </textarea></td></tr><br />        <tr><td align=\"right\"><b>Submitted By:</b></td><td>$row[name]<br />        </td></tr><br />        <tr><td align=\"right\"><b>Email:</b></td><td>$row[email]<br />        </td></tr><br />        <tr><td></td><td><input type=\"submit\" name=\"edit_link\" value=\"Edit Resource\" /><br />        </td></tr><br />        </table><br />        </form>";<br />}<br />


I think the selected item code could be a little cleaner, but it seems to be working for me...

Enjoy!


--------------------
Matt Reinfeldt
http://www.mattreinfeldt.com/
Joined: Oct 2001
Posts: 27
User
User
Joined: Oct 2001
Posts: 27
[]ekempter said:
Isn't the lastest and greatest release of this mod supposed be included in the first post. I thought that was the protocol. I am having the same issue where adding sub categories become catagories. Does anyone have the fix? [/]

I fixed this in links_admin.php in function add_sub_cat.

Change:
$query = "INSERT INTO {$config['tbprefix']}links_categories
(parent_id, title, cat_desc)
VALUES (0, '$title', '$description')
";

To:
$query = "INSERT INTO {$config['tbprefix']}links_categories
(parent_id, title, cat_desc)
VALUES ('$parent_id', '$title', '$description')
";

I also found that if you had sub categories but no category description the first sub category was needlessly indented. To resolve this, I added a <br /> to links_show_cat.php

Change:
# Make sure we have something to print.
if ($i <= $Numberofcats) {
print "
<td valign="top"><img src="{$config['phpurl']}/images/folder-c.gif" alt="" /> <font size="2"><b><a href="links.php?op=List_Links&cat_id={$cats['cat_id']}&parent_id={$cats['parent_id']}&title={$cats['title']}"><u>{$cats['title']}</u></a></b></font><br />      <font size="1">{$cats['cat_desc']}</font>
";

To:
# Make sure we have something to print.
if ($i <= $Numberofcats) {
print "
<td valign="top"><img src="{$config['phpurl']}/images/folder-c.gif" alt="" /> <font size="2"><b><a href="links.php?op=List_Links&cat_id={$cats['cat_id']}&parent_id={$cats['parent_id']}&title={$cats['title']}"><u>{$cats['title']}</u></a></b></font><br />      <font size="1">{$cats['cat_desc']}</font><br />
";

The email that is sent needs to be changed to use the From e-mail addresss specified within the config settings 'contact email address' field. I didn''t have time to fix this one.

I'm sure that others would appreciate it if the first fix was included in the release.

HTH.

Joined: Aug 2000
Posts: 1,290
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,290
Anyone have this problem, links waiting for approval, are approved, but do not show....???


- Custom Web Development
http://www.JCSWebDev.com
Joined: May 1999
Posts: 241
Coder
Coder
Offline
Joined: May 1999
Posts: 241
did you check the cat_id of the ones you approved?


--------------------
Matt Reinfeldt
http://www.mattreinfeldt.com/
Joined: Oct 2001
Posts: 27
User
User
Joined: Oct 2001
Posts: 27
links_show_cat.php script does not count the links within main categories. The attached script revises this in v 1.5.
Attachments
116862-links_show_cat.zip (0 Bytes, 42 downloads)

Joined: Jun 2001
Posts: 356
Junior Member
Junior Member
Offline
Joined: Jun 2001
Posts: 356
hey guys, i get this problem after i've installed it.

Warning: main(main.inc.php): failed to open stream: No such file or directory in /home/fordmond/public_html/ubbthreads/links.php on line 52

Fatal error: main(): Failed opening required 'main.inc.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/fordmond/public_html/ubbthreads/links.php on line 52


yep, i have searched these forums, but all i get are sql errors from threadsdev when submitting it, weird.

Joined: Aug 2000
Posts: 1,290
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,290
Okay got the last prob fixed. Any ideas how to get WOL to show the links sections properly?


- Custom Web Development
http://www.JCSWebDev.com
Joined: Aug 2000
Posts: 1,290
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,290
*bump*


- Custom Web Development
http://www.JCSWebDev.com
Joined: Nov 2000
Posts: 210
Member
Member
Offline
Joined: Nov 2000
Posts: 210
What is WOL?

Joined: May 1999
Posts: 241
Coder
Coder
Offline
Joined: May 1999
Posts: 241
it's short for, "Who's Online".


--------------------
Matt Reinfeldt
http://www.mattreinfeldt.com/
Joined: Nov 2000
Posts: 210
Member
Member
Offline
Joined: Nov 2000
Posts: 210
hehe ok thanks

Joined: Jul 2001
Posts: 808
Coder
Coder
Joined: Jul 2001
Posts: 808
I guess its time for a new thread for this add on with an actual file attached to it.

Joined: Oct 2001
Posts: 27
User
User
Joined: Oct 2001
Posts: 27
Post deleted by ekempter

Joined: Jul 2001
Posts: 808
Coder
Coder
Joined: Jul 2001
Posts: 808
you can edit the link as Admin by clicking on the green LED button. The red one will delete the link.

Joined: Dec 2002
Posts: 67
Power User
Power User
Joined: Dec 2002
Posts: 67
* Arrgh tables!

Last edited by Calpy; 08/04/2004 5:18 PM.
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
It looks like you are trying to create tables which already exit.
Have you already used this mod? If so you don't need to create the tables, they should already be there.

Joined: Dec 2002
Posts: 67
Power User
Power User
Joined: Dec 2002
Posts: 67
[]http://www.calpernia.com/ubbthreads/images/icons/grnlite.gif[/]
* Hi all. Love the idea of this mod, I modded a very simple guestbook script to do something similar in a much less cool way, looking forward to replacing it with this. After several tense hours of struggling to install the five different versions of this script linked in this thread and guess which fixes applied to which version, I got something up and running, but upon trying to add a link I get this message:
[] -- Your email address does not appear to be valid. Please check the format and try again[/]
* I don't need it to validate email anyway since it's using the email on record for the user, but I suspect the issue is the globals thing that made it impossible to even submit a category until I added that get_input reference to the header. Is there a similar ref I can put into the links_submit to keep these variables from blanking out?
* As someone suggested, it would be a good idea to remove the non-working attachments here, at least. This is such a good mod it seems that lots of people want to try and use it.

Joined: Oct 2001
Posts: 27
User
User
Joined: Oct 2001
Posts: 27
The links_submit_link script doesn't like caps in email addresses. Like you said, there isn't a reason for it to be validating the email address anyway so I took mine out.

Under: // Check to see if the form was filled out completely
Comment out (//) the following -
From: if (!valid_email($email))
To: } (right after exit which is approx 4 lines down).

Last edited by ekempter; 08/08/2004 5:11 PM.
Page 8 of 11 1 2 6 7 8 9 10 11

Link Copied to Clipboard
Donate Today!
Donate via PayPal

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.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Posts: 70
Joined: January 2007
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)