integration with vote up down

patchak - October 24, 2006 - 13:59
Project:MySite
Version:HEAD
Component:- Type plugin
Category:feature request
Priority:normal
Assigned:mehrdad1342
Status:closed
Description

Hey there,

I would like to build a new plugin to use with the storylink content type that comes with the vote up down package...

I checked out the docs (great docs!! incredible!!) and I think I understand the first part (the array) but then the rest... I can,t figure out how to do it...

Would it be possible for you to use the storylink content type as an exampleto build a new type plugin from the ground up? This would help newbies in coding like me to understand how to add more types in the future by themselves??

Thanks
BTW: your module is just great! It opens the door to wayyy better sites than a basic digg.com clone for example...

#1

agentrickard - October 24, 2006 - 17:20

The documentation tries to cover this in great detail, if you walk through section 2.4.1 - 2.4.9, I think you'll find how to build from the ground up. (You probably don't need to use 2.4.10, the forms feature.)

I agree that having a ground-up tutorial would be good, as well. I would prefer to write one against a 'core' Drupal content type, if one exists that the current release doesn't address.

#2

patchak - October 25, 2006 - 15:06

Ok I understand... I guess with a tutorial for a normal node type i could learn from it and apply it to the type I need,,, I was just in a hurry to use this with vote up down :-)

thanks

#3

agentrickard - October 25, 2006 - 17:32

I'm not sure how you would use this with Vote-Up-Down, since we don't use node_view() to generate the MySite content.

This is because not all MySite content is node content.

It also goes against design a little, since MySite is not meant to be a replacement for normal node views, just a personal shortcut page.

#4

patchak - October 25, 2006 - 20:49

Hi,

I want to use it to add an easy way add functionnality that could permit to see storylinks that are added by specific users, exactly like for the user"s blog

Thanks

#5

agentrickard - October 27, 2006 - 14:47

I get it now. I had to look at the storylink code.

This post is a note to clarify part of what MySite does.

MySite does not let you collect all nodes of type {x}. Simply being a node type isn't enough (IMO). Those nodes must be organized by some other control schema. In the case of blogs, it's $user->uid; storylink, the same way.

That's why there aren't includes for 'page' and 'story' -- generally, I think that Taxonomy covers those node types. I was originally thinking that taxonomy will cover Storylinks (and it will), but the organization along $user->uid makes sense as well.

The use case is "Show me all links added by {user name}."

#6

agentrickard - October 27, 2006 - 14:49
Title:How to build a new type (non coder here..)» Add a storylinks.inc

Changing title to reflect true content.

#7

patchak - October 27, 2006 - 15:15

Yes exactly, show me all story links posted by "username" and in conjunction with the content recomandation engine, people will know which username enter there, so it's really useful for a digg-like site.

Thanks for your time

#8

agentrickard - October 27, 2006 - 17:14

What does this part mean?

> in conjunction with the content recomandation engine

#9

patchak - October 27, 2006 - 17:27

CRE content recommandation engine is a module for drupal that automatically pushes content to users according to their voting patterns.

It also recommends users (for example if you vote 2 times on a story by a certain user he will appear on the list of recommended users.. Also it suggests users that have the same voting pattern as you, so you can discover new quality content more easily.

When the CRE suggests a user, a person could go to his page and directly add that person in it's list for example. That's what I was trying to say lol, sorry english is not first language, so... ;)

#10

agentrickard - October 27, 2006 - 20:37

Ah. That's a separate feature :-)

#11

patchak - November 1, 2006 - 16:25

Hi,

Actually I was not thinking of integrating the two modules directly, but it's great idea! Imagine if you could have users pushed by cre's results into the mypage user selection section!! It would be great! I'll do a proper feature request for that I guess!

But returning to the subject of this post, are you willing to build an example out of storylink node type it would be really helpful as it still seems quite complicated for me to do it!

Thanks

#12

agentrickard - November 1, 2006 - 18:00

I think doing a tutorial is a good idea.

But since storylinks is contrib and book is core, I'll probably do the book.module as a how-to.

http://drupal.org/node/91588

#13

patchak - November 1, 2006 - 19:30

I undersand the logic behind what you say, but I still think doing it for storylink.inc is a better idea, especially since you seem to have trouble getting use cases for the blog one.

Don't waste your time on the blog one if you think it's useless and so the tutorial on one content type that you'll know someone will use right away!

;)

cya, patchak

#14

agentrickard - November 2, 2006 - 14:23
Status:active» postponed

#15

patchak - November 12, 2006 - 18:42
Status:postponed» active

Here is the storylink.inc that I've built, I hope everything's fine with, I guess you couls have a quick look to see it it's rightly done?

btw, if you can create a po file easily for this file i'd appreciate it, I have trouble with the extractor.php

thanks

AttachmentSize
storylink.inc.txt 7.19 KB

#16

agentrickard - November 13, 2006 - 14:05

This looks right. Does it work for you?

A few minor changes, noted in the latest version of the README.

  • Remove everything after the $Id tag on line 2.
  • Line 20: Either use 'Storylink Posts' or 'storylink posts'. Don't mix case.
  • Line 22: Default translation string should be in English (sorry).
  • The comments on line 44 can be removed, it doesn't apply.
  • The check_plain() on line 69 has been removed. Just use $title.
  • The user access checking in the storylink_block has been moved. This simplifies your code, actually. You can move the storylink acccess check into the first IF and remove the second IF. See the README example code.
  • You should write a mysite_type_storylink_block_node() function. This will show the block link when you are looking at a storylink node page. See the README.
  • The $implode on line 197 has been removed.

This is good stuff.

#17

agentrickard - November 13, 2006 - 14:12

Translation instructions http://drupal.org/project/drupal-pot.

Once you have extractor.php, put it in the mysite folder, then run from the command line:

cd location/of/mysite
php extractor.php --files /plugins/types/storylinks.inc

This should generate a storylinks.po or general.po file inside the mysite directory.

#18

patchak - November 13, 2006 - 16:15

Hi,

I'll try tonight... I,m not sure i have access to a command line on my server... but I guess I,ll figure it out...
thanks for the comments on the .inc file, I'll post an updated version soon

thanks

#19

mehrdad1342 - November 14, 2006 - 10:52
Title:Add a storylinks.inc» Educational Technology center
Version:4.7.x-1.x-dev» HEAD
Assigned to:Anonymous» mehrdad1342
Status:active» by design

This Site is for trial.

#20

patchak - November 14, 2006 - 13:09
Title:Educational Technology center» integration with vote up down

humm brought back a title that's more related to the issue ;)

#21

agentrickard - November 26, 2006 - 19:52
Status:by design» closed

This has been added to the tarball.

 
 

Drupal is a registered trademark of Dries Buytaert.