Welcome to Geeklog Tuesday, October 17 2017 @ 01:49 am EDT


Status: offline

MrHyde

Forum User
Junior
Registered: 09/11/2003
Posts: 15
Quote by machinari: yes yes, the language file is the first place to start.

Thanks both you and jhackwith. Editting the language file worked.

Quote by machinari:
Try it out by using phpMyAdmin. You'll be editing the size of the index created on the "Quotes" UNIQUE KEY from 32 to some larger number. This is done on the structure tab (should be the default tab when opening up the table).

Let me know if that helps.

This worked as well. I had to increase the value to 52.

I have now managed to import all my previous quotes to your database without any errors.

Now, I've been poking around the code so that it will support my use of titles. I have changed the db to add that one field as well as modified the add and add2.php so people can use titles. But I haven't succeeded in changing the templates to make it work just yet. I know I need to make a few changes in the functions.inc file in the functions used to retrieve the quote and the one used to display the centerblock, but it is doing weird thing when I made those changes. Hopefully, a bit more poking around will make this plugin exactly what I need.

Once again, thanks for all the work you put into creating the plugin. It is extremely useful.

Status: offline

machinari

Forum User
Full Member
Registered: 22/03/2004
Posts: 1512
Instead of doing all that with yet another field, try this:
change the centerblock.thtml file from:
PHP Formatted Code

                        <table border="0" align="center">
                                <tr>
                                        <td width="1%">
                                                <p>"{dispquote}"</p>
                                                <p align="right"><em>{dispquoted}{source}</em>{sourcedate}</p>
                                                <p style="text-align: right; font-size: 8pt;">{subm_by}{dispcontr}
                                                {cat}{dispcat}</p>
                                        </td>
                                </tr>
                        </table>

 

to this:
PHP Formatted Code

                        <table border="0" align="center">
                                <tr>
                                        <td width="1%">
                                        <h3>{source}</h3> <!-- this is used for title -->
                                                <p>"{dispquote}"</p>
                                                <p align="right"><em>{dispquoted}</em>{sourcedate}</p>
                                                <p style="text-align: right; font-size: 8pt;">{subm_by}{dispcontr}
                                                {cat}{dispcat}</p>
                                        </td>
                                </tr>
                        </table>

 

just a thought... the source field would then be your title and appear above your quote.

but if you are intent on hitting the code, keep in mind that the quotes are selected in a number of places: functions.inc; index.php; search.php; manage.php; moderate.php. In all those places, the select statements are similar but not exact--your field will have to be represented in all those places. then the display involves setting the variables in the proper functions,, editing the template to reflect those variables... and so on. don't forget about the input--check it for nasty bits. etc.

Status: offline

shetzel

Forum User
Chatty
Registered: 19/03/2004
Posts: 39
OK. I've tried the category management pages and I'm pleased with the direction its going. I like the ability to create categories myself, and I have a few suggestions.

1) I got an error when I tried to disable a category. It claimed that the category already existed, which it obviously did. When I looked at the code, I found that it seemed that would every time, since the category will always be found.

2) Would it be possible to have fewer buttons? It's a very "busy" form, but I realize that it's a safety measure to have individual "Delete" buttons. But it's a little unusual to have a separate "Update" button for each item. An idea would be to have three option buttons each, "Enable", "Disable", and "Remove" with an "Update" and "Cancel" (or "Reset") at the bottom of that form section. I also realize that it is currently similar to your quote management page, rather than your plugin config page. It's your call, of course. Just something to think about.

3) Now that I have a mechanism to directly add categories, would it be possible to prevent regular users (not admins) from adding categories dynamically when they add quotes? As an admin, I find it a little uncomfortable to allow Joe User the ability to add a category. After all, they can't add news topics, can they? Of course I can always delete the category, and reassign the quote to a more appropriate one, but that's only after I notice the new category (if I ever do).

3a) Since some admins obviously like and depend on this feature, I'd think it might be best implemented as a config option.

Thanks for listening. This monster is rapidly exhausting all of my ideas to improve it.

Status: offline

machinari

Forum User
Full Member
Registered: 22/03/2004
Posts: 1512
Quote by shetzel:I got an error when I tried to disable a category.
Sorry, fixed it. Wasn't thinking at 3 AM.
Quote by shetzel:Would it be possible to have fewer buttons?
How bout that eh? I keep saying I don't like clutter and then I go and do that. Well, I agree with you--too many buttons. problem is that each quote uses its own form.. so I'll have to change that up a bit.
Quote by shetzel:An idea would be to have three option buttons each, "Enable", "Disable", and "Remove" with an "Update" and "Cancel" (or "Reset") at the bottom of that form section.
I like that idea--good work. good thing I'm not paying you, I'd go broke.
Quote by shetzel:would it be possible to prevent regular users (not admins) from adding categories dynamically when they add quotes? ... I can always delete the category, and reassign the quote to a more appropriate one
I had that idea from the beginning and just deleted the commented lines last week. I think it would be easier though to just comment the input field in the template file. also, if you have moderation turned on, you would see the category and could edit it before it is submitted--it isn't enabled until it is approved--only if the queue is turned on however.

Here is another idea for you to kick around... I've put an edit link into the quote display that shoots the quote to the manage page for editing. Is there really any use, now, for the search form on the manage page?

time for sleep. l8r

Status: offline

machinari

Forum User
Full Member
Registered: 22/03/2004
Posts: 1512
ok, I changed my mind...

I'll make the option to add a category configurable, but only for logged in members.

Status: offline

shetzel

Forum User
Chatty
Registered: 19/03/2004
Posts: 39
[quote by machinari]I'll make the option to add a category configurable, but only for logged in members.[/quote]
So... anonymous users cannot add categories, and logged-in users can add them if the site is configured to allow it? That'd be fine. Or did you have something else in mind...

[quote by machinari]Well, I agree with you--too many buttons. problem is that each quote uses its own form.. so I'll have to change that up a bit.[/quote]
Well, it's something to ponder a bit, anyway. One of my occasional tasks at my last job was GUI development. Although it wasn't for web interfaces, it taught me to always ask if there is something simpler and/or more intuitive that could be done. The current interface is intuitive, certainly, but it's not exactly simple. Just think about it, I guess.

[quote by machinari] I've put an edit link into the quote display that shoots the quote to the manage page for editing. Is there really any use, now, for the search form on the manage page?[/quote]
Well, that's a good question. There was never any need, per se, since it could have been searched through the site's main search page. However, I thought it was kinda nice to have a directed quote search, more geared to searching the quotes.

The link is displayed only for admins, I assume? The edit link (while useful) really only helps if the random quote comes up for the admin. For everyone else, the problem would need to be reported, then I'd have to search it out to fix it anyway. Besides, for the regular users, I suppose it's kinda nice to be able to search for a quote right near the same page that they would add a quote.

I'd suggest keeping it, although it does add to the weight of the plugin and the amount of code that needs to be maintained.

Status: offline

shetzel

Forum User
Chatty
Registered: 19/03/2004
Posts: 39
Machinari,

Couple of gentle suggestions...

1) What do you think about putting the Source Date in parenthesis instead of following a comma? It just seems a bit more "standard" if you know what I mean. See imdb's movie listings, for example. Obviously, I can hack it myself, but I'm talking more about a permanent change.

2) Would it make sense to have the Google link for the Quoted field be disablable within the config screen? About half my quotes are of a personal nature, about half are from movies and books and stuff. It's just kinda weird to have a Google link searching for "Kate" or "Jim".

Just a couple of thoughts...

Have a good weekend thinking about it.

Status: offline

machinari

Forum User
Full Member
Registered: 22/03/2004
Posts: 1512

re source date in parentheses: good idea--i didn't bother to research and find out what the standard might look like.

re google link: I agree with you that it will not be universally acceptable. making it configurable may fix it one way, but if half the quotes are still google-able, then what could you do?

hmmm... maybe (and tell me if this is over the top) if I made the ggl link configurable per category, adding that configuration to the category management page... hmmmm... but then what if the quote belonged to a ggl active category at the same time as belonging to one that wasn't? your thoughts? perhaps just on or off is enough.

Jill

Anonymous
I've put an edit link into the quote display that shoots the quote to the manage page for editing. Is there really any use, now, for the search form on the manage page?


Whooohooo!!! Great to see Machinari...can't wait to get my hands on that feature...

Yeah I think you're right there actually...there really isn't much use for the search form on the manage page now...hmmm...but that's ok isn't it?

Jill

Anonymous
re google link: I agree with you that it will not be universally acceptable. making it configurable may fix it one way, but if half the quotes are still google-able, then what could you do?


I'll just stick my nose in here and say that I like the idea of being just being able to turn the Google links "on" or "off". I think that would be sufficient. Personal preference speaking of course...but there you go.

Jill

Anonymous
thoughtful
for example, a poem belonging to the "milton" category as well as the "poem" category. this would allow your users to click on the "milton" category to see all items in that category, or to click on the "poem" category to see all the poems (not just by milton). A title field would be specific to the item and not clickable to anything else. Do you see what I mean? This is actually why a created the possibility of a single item belonging to multiple categories.

You almost had me convinced but then I remembered the categories.
I'm still open to argument if you like....


Ok I can see where you're coming from...fair enough too. Suppose though, that a user wants to only see poems on a specific topic such as "Christmas". Currently, they can would only be able to view either all poems OR all items (which in our case is jokes, poems, lyrics, quotes etc.) relating to "Christmas". Am I right?

Hmmm actually do you think we might be drifting into the realms of sub-categories rather than a title field? What are your thoughts?

Status: offline

machinari

Forum User
Full Member
Registered: 22/03/2004
Posts: 1512
Quote by Jill:Hmmm actually do you think we might be drifting into the realms of sub-categories rather than a title field? What are your thoughts?
yes yes, but multiple categories was hard enough, nevermind sub-categories on top of it all.

but the structure of the lookup table should allow the search feature to be modified in such a way to limit by one category (which it does now) and then by another within the first. So you could limit your search by christmas and then by poems, returning only christmas poems. I'll have to look into that.

re the google links. yes, it is easy enough to do a google manually if need be so on/off will suffice.

re the search form on the manage page. It is redundant now, but i'll leave it for the time being. The problem is, i'm testing with 100 plus categories and 1200 plus quotes, if I search for a single and common word, well, it's just a nasty page load

Also, I just wanted to mention again (if I haven't already) how much I appreciate the advice and suggestions from all of you. It is a great help so don't ever be shy or think you might be annoying me.
I like it

Jill

Anonymous
yes yes, but multiple categories was hard enough, nevermind sub-categories on top of it all.


Fair enough...LOL...your solution sounds like a great idea though. We love to see that feature incorporated if at all possible.

Just as a side note though...we have been prefixing our items within the quotation field with "poem:", "quote:", "lyric:" etc which has been discussed earlier in this topic. Using the current search (with no modifications) we've simply searched the "Christmas" category for the literal term "poem" and...low and behold we get a listing of Christmas poems...duh that was so easy. Exactly what we were wanting to do.

Let me just say again how much we are loving the plugin as it is. We are a fair way into loading our database of quotes now and the more we use it, the more we like it. Any new features now are just icing on the cake really...

Jill

Jill

Anonymous
Just as a side note though...we have been prefixing our items within the quotation field with "poem:", "quote:", "lyric:" etc which has been discussed earlier in this topic. Using the current search (with no modifications) we've simply searched the "Christmas" category for the literal term "poem" and...low and behold we get a listing of Christmas poems...duh that was so easy. Exactly what we were wanting to do.


Ok wait no...sorry that doesn't work. We're getting every listing with "poem:" in the quotation field...even if we limit the search to the category "Christmas". I thought it did what we wanted on initial inspection...

Status: offline

machinari

Forum User
Full Member
Registered: 22/03/2004
Posts: 1512
Quote by Jill:Ok wait no...sorry that doesn't work. We're getting every listing with "poem:" in the quotation field...even if we limit the search to the category "Christmas". I thought it did what we wanted on initial inspection...
are you saying that your search is returning quotes that don't belong to the christmas category even when limiting your search to that category? If that is true, something is broken.

Jill

Anonymous
Yep machinari... that's exactly what I'm saying. I just double checked it again and I'm definitely getting everything with "Poem:" in the quotation field regardless of the category the item might actually be in. Limiting the search to within one category does not appear to be working...in our installation anyway...hmmm (Just to clarify I'm running dailyquote 1.0.3 with GL1.3.9sr1.)

Is it just me or do others have this problem as well?

Jill

Anonymous
Just a footnote to my previous post...I can limit the same search to a particular Contributor...no problem. I don't get any results from any other Contributors. The limit to a Category part does seem to be broken however.

Jill

Status: offline

jhackwith

Forum User
Chatty
Registered: 24/07/2004
Posts: 63
Location:Lewiston, Idaho
Quote by Jill:
re google link: I agree with you that it will not be universally acceptable. making it configurable may fix it one way, but if half the quotes are still google-able, then what could you do?


I'll just stick my nose in here and say that I like the idea of being just being able to turn the Google links "on" or "off". I think that would be sufficient. Personal preference speaking of course...but there you go.


I'd like to third that request, with a slight modification: What I'd like is to have my visitors, when they click on the author, taken to a search page that shows all the quotes in the database by that author.

Maybe you could have a selection on the administration page that would allow you to choose one of the three options: Google search, database author search, or no link.

Also, I'd like an index page that lists authors, just like the category index.
"Beauty... is the shadow of God on the universe." ~ Gabriela Mistral -- Desolacíon

Status: offline

machinari

Forum User
Full Member
Registered: 22/03/2004
Posts: 1512

well, any more changes wont make it into 1.0.4 because it is ready to go already. I just cant get it uploaded... my upload page is returning the dreaded 500 internal server error. I wonder what they changed?!...

I'll let you know where I put it.

but for now... I'm off to play ut2k4 cuz I have tons of work to do..

Status: offline

shetzel

Forum User
Chatty
Registered: 19/03/2004
Posts: 39
I'm looking forward to it. I really like these weekly updates, but I wonder how long you can keep it up! You're spoiling us.

1) On the google link: a simple On/Off switch would be fine with me. Any other features you decide to add would be like a tasty gravy.
2) On 1.0.4 version: Did the category management page make it in officially yet? Or is it still in beta?
3) On the search page: Perhaps I misunderstand. Why is it redundant?

Have fun with UT, I'm a Joint Ops guy myself. It's all good.

All times are EDT. The time is now 01:49 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content