Closed (fixed)
Project:
Ping.fm
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
16 Dec 2008 at 15:37 UTC
Updated:
12 Nov 2011 at 05:58 UTC
Jump to comment: Most recent file
Using custom URL.
Created a custom node type - "Microblog" - with normal title and body fields. Post is set to default published but not promoted to front page.
Posted a note from ping.fm
The note text is in the body but:
1) Post has no title.
2) Post was promoted to front page.
The title - not sure what to suggest here - any thoughts? I know I can't edit the post without assigning one.
The promotion - it would be better if the node type settings were used for the node type assigned.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | pingfm.module.patch | 2.87 KB | chuck1975 |
| #8 | pingfm.admin_.inc_.patch | 601 bytes | chuck1975 |
| #7 | pingfm_promote.patch | 1.14 KB | chrissearle |
| #5 | pingfm.module.zip | 2.93 KB | chuck1975 |
| #2 | pingfm.module.zip | 2.66 KB | chuck1975 |
Comments
Comment #1
chrissearle commentedHmm. Something else about the creation means that things like Taxonomy Defaults (sets up a default allocation of terms based on node type) are not being applied either.
Comment #2
chuck1975 commentedI was able to fix the no title problem, but I had to add code to the pingfm.module.
Ping.fm will only pass a title if the service supports which is only "blog"... I wanted to be able to pass status messages to my site with a default title. So I changed the following in pingfm.module at line 193
I also attached my updated pingfm.module file.
Comment #3
chrissearle commentedSomething like this would work for me too (since I don't want to show the title itself - I just want it in a block view showing the contents). I just got irritated that I had to manually assign a title on edit each time.
However - for me the big issue is things like post promotion - you can see it in your code there -
'promote' => 1,- this ignores the setting on the content type. It should be just a case of retrieving the info (or at least that's the short fix - I have not looked at how nodes are created programatically so that other modules (taxonomy_default for example) get a chance - not sure if its here or elsewhere that would have to be looked at.If I get a chance I'll look at this myself - but right now I'm in the middle of a difficult 5.x to 6.x upgrade for someone else (and of course - xmas is getting closer ... ;))
Comment #4
robloachWhat if we just got the first 50ish characters of the node teaser if the title isn't there?
Comment #5
chuck1975 commentedBecause I am currently snowed in... I have continued to poke around with this module. Did a few more updates. I guess now I need to figure out how to submit back to the project... All though I am sure the code is not good, but it does work.
* User can configure the default title and use "!user" variable in the title
* Default title is only used if no title is passed from ping.fm
* User can set the promote option to on or off
I am working now on trying to allow the admin to override these user settings and force the promote on or off, and force the title format.
*update pingfm.module is attached.
Comment #6
chuck1975 commentedWould be a good option if some one is using ping.fm to submit a full blog entry or a large microblog. However the smaller status messages that can come from ping.fm are often smaller than 50ish...
With that said, it could be one of the options. Such as "Use first X chars if body is more than X characters"? not sure...
Chuck
Comment #7
chrissearle commentedOK - not looked at the title - since there are at least two suggestions here - but the attached patch will take the promote setting of the node type that the user has selected. I felt that it was better to fetch the option from the node type rather than have a new custom option to set.
Comment #8
chuck1975 commentedAttached are two patch files that cover all the changes that have been made including from chrissearle to default the promote option to the nodetype properties.
Updates:
* All user to set the default title format
+ can use "!user" as replacement text
* Admin option to allow user to override nodetype promote setting
* User option to force promote (only viewable if admin allows)
* defaults promote to nodetype settings unless admin allows override and user has set the override.
I ran through several tests but with out any problems... but I am sure there is something I didn't think of.
Comment #9
robloachHi Chuck. Nicely done with the patch! Thanks for having a look at this. There are a couple things I'd love tweaked before this goes in:
if ( variable_get('pingfm_prom_ovr', FALSE) == TRUE )in the user options, you could just use'#access' => variable_get('pingfm_prom_ovr', FALSE):-)... YAY Drupal!Awesome work, Chuck! This is looking pretty slick. Once those changes are in, I think it should be commit ready. :-) Keep it up!
Comment #10
chuck1975 commentedThanks Rob... I will make the changes tonight and update.
Comment #11
chuck1975 commentedHey Rob,
quick question on number 3...
3) Could we use "is_null" instead? ....
- What did you want to replace with the is_Null? would it be instead of isset?
* sorry if this is an obvious question, new to coding with Drupal. :-)
1 - changed the wording to your suggestion. This does make more sense
2 - comments removed.
4 - OK... that is so much cleaner. Yay Drupal indeed!
Thanks, Chuck
Comment #12
chrissearle commentedJust tested the new patches. Applied cleanly and worked for me :D
If I could have one more thing (greedy of me - I know) then it would be the ability to have !teaser (or other appropriate named replacement) in the User account setting for title for a custom URL post where the title is missing.
This would function the same as "ping.fm for !user" but would be the first n chars of the body - or perhaps even better - the longest number of words (space used as delimiter) that do not go over n chars in length.
Looking at my own posts - n=50 would be good - this could be configurable - but would that be overkill?
One other comment - something I found really useful when I started writing patches for modules was coder module. If you install it then go to modules page in admin you get a link that does a drupal coding standards review for you. I found it really helpful so I thought I should recommend it ;)
Comment #13
blueskiwi commentedif I download the current dev version do I need to apply these patches being discussed here, or they've been rolled in?
Comment #14
chuck1975 commentedThey have not been rolled in as of yet. So if you need the extended features and small fixes, then you should apply the patch.
Comment #15
kapow99504 commentedI like what you did here but when I look at the module's code it looks like it has changed since you made these fixes, have you updated the patch for the new module version?
Comment #16
Steven Brown commentedUsing custom URL from Ping.fm capability will be updated with the following.
1. We will check the content type's default settings to determine if the node being created needs to be published or have comments on the node.
2. If there isn't a title passed we will generate one from the body text or the suggestion from #5.
Comment #17
Steven Brown commentedDue to this issue being around 3 years old I'm changing the status to closed.