Gossamer Forum
Home : Products : Gossamer Links : PHP Front End :

misc. (and mostly minor) laundry list

Quote Reply
misc. (and mostly minor) laundry list
In no particular order, here are some items I've noticed during working with Links SQL 2.1.1.

1) The detailed.html template does not seem to define $cat_linked or $title_linked (only $title) for linking back to the category. Kinda tough to navigate if using the next/previous detailed links and wanting to get back to the category... I'm not sure about $cat_linked's availability, but the default detailed.html says $title_linked should be available.

2) In review_search_results.html, $cat_linked isn't defined above the foreach($Review_Loop) loop, making it a bit difficult to customize the display to look like other pages throughout Links.

3) Any reason not to put reviews into the detailed page (or at least make it an option)? That seems like an intuitive place for them. Otherwise, the detailed page becomes pretty redundant unless you add some custom fields to fill it out.

4) Forward slashes in link titles get converted to whatever category separator symbol you use (> in my case, : by default) in the detailed.html template when displaying it with $title (doesn't happen with $Title, so presumably wouldn't be an issue if $title_linked worked in the template).

5) After updating a review (through the user interface), I got these errors followed by a second page (inline) showing the received review:

Quote:
Column Review Link ID cannot be left blank.
Column Review Owner cannot be left blank.
Column Review Rating cannot be left blank.
Column Review Date cannot be left blank.
Column Review Subject cannot be left blank.
Column Review Contents cannot be left blank.
Column Review Validated cannot be left blank.

It doesn't look like the review actually got updated, though... Nothing was submitted to the admin email address, nothing waiting to be validated, no changes made, etc.

6) What is the 'Review Validated' yes/no field for in addition to the validate/reject options?

7) What exactly is $Review_ByLine intended for? Seems redundant with reviewer's name and subject already shown... I tried corresponding it to something in Amazon's review setup (which the Links reviews look to be closely modeled after) and could not.

8) !$cfg_user_review_required in review_add_success.html still shows the anononymous name/email fields even when turned on (yes) in admin options. Should that be $anonymous like in review_add.html?

Dan
Quote Reply
Re: [Dan Kaplan] misc. (and mostly minor) laundry list In reply to
9) $term in search results template does not seem to grab multiple words in a search query like it used to, instead just showing the last word. Makes it not so useful for passing the search query to links to other search engines...

10) This appears to be a big problem: I modified a few links through the user interface and all seemed to go well (confirmation of the modification, and the email to admin properly showed the before and after), but when I went to the admin area to validate them, it showed blank forms for each link awaiting validation with the following in the message textarea:

Quote:
Your link:

Unknown Tag: 'URL'

that was submitted on Unknown Tag: 'Add_Date' has been rejected...

Any ideas what's going on? New additions don't seem to have that problem.

Dan
Quote Reply
Re: [Dan Kaplan] misc. (and mostly minor) laundry list In reply to
11) Another problematic item... When validating a link submission, the confirmation email sent to the user seems to use the email-add.txt file from the 'default_php' folder instead of from the 'local' folder. I thought maybe it had to do with my safe mode hack

http://www.gossamer-threads.com/...?post=205698;#205698

so I undid that and tried it again, but same thing. I don't see anything in the code that would cause template files ending in .txt to not be seen in the 'local' folder...

Is anyone there??? Even a "no one's around this week" would be helpful... :)

Dan

Last edited by:

Dan Kaplan: Jul 17, 2002, 8:55 AM
Quote Reply
Re: [Dan Kaplan] misc. (and mostly minor) laundry list In reply to
#1 and #2 can be scratched off the list.

1) Turns out 'title_linked' actually is available in detailed.html, it was just mislabled in the available tags at the top of the template. In Page.inc.php's generate_detailed_page(), it is prepared as 'title_l' instead of 'title_linked'.

2) It appears the review routines (Review.inc.php's review_search_results() ) only query the categories if it is a user search, so I had to add my own category lookup:

Code:
$sth = $DB->query("SELECT Full_Name FROM ${PREFIX}Links l, ${PREFIX}Category c, ${PREFIX}CatLinks cl WHERE l.ID = cl.LinkID AND c.ID = cl.CategoryID AND l.ID = '$id'");
$row = $sth->fetchrow_hash();
$results['title_linked'] = _title_linked($row['Full_Name'], array('link_all' => 1));

I added that after $results['link'] = $results; near the bottom of the function.

Dan
Quote Reply
Re: [Dan Kaplan] misc. (and mostly minor) laundry list In reply to
I think I see what's happening on #11. It appears the admin areas are not properly set up to use the PHP templates. The email-add.txt form is being assembled from the 'default' directory, not 'default_php'. As such, I have no custom 'local' templates in that folder, so it uses the G-T default.

That's not by design, is it?? It would be quite counter-intuitive to have to build different templates for different locations just because you use the PHP front end...

I've noticed in the admin area that when going to Build > Templates (or) Globals, it always defaults to the Perl set (no option to change build_default_tpl to something else in the build options, as you can't build with the PHP ront end). It sort of feels like the PHP templates are not recognized by the Perl-centric admin area unless specifically told to do so. Seems like a few steps were left out in the PHP template selection options...

Edit: The email templates get prepared in Tools.pm's sub _validate_record{} and reference Links.pm's sub user_page{} which bases its template selection on build_default_tpl, which is a problem as mentioned above. Now if I can just figure out where configuration settings are stored, maybe I can try manually overriding build_default_tpl and see what happens...

Edit 2: Yikes, scratch that idea. I overlooked ConfigData.pm for some reason (duh), but see that's where the good stuff is stored. I tried changing build_default_tpl to 'default_php' but got the following error when visiting page.php:

No such template set: default_php

Now I'm thoroughly confused...

Dan

Last edited by:

Dan Kaplan: Jul 17, 2002, 6:36 PM
Quote Reply
Re: [Dan Kaplan] misc. (and mostly minor) laundry list In reply to
It appears #10 has nothing to do with the PHP interface, so I'm probably better off posting that problem in the general forum.

Interestingly, when viewing the Links_Changes table in phpMyAdmin, I'm unable to use the Edit (or Delete) link on any of the modified links. It would appear something about the ChgRequest column is giving it problems. When doing the same through MySQLMan, I can view ChgRequest's contents without any troubles. Looks like all the fields are properly reflected there, so at least I know the data is being submitted.

Dan