NAME

Slash::DB - Database Class for Slash


SYNOPSIS

        use Slash::DB;
        my $object = Slash::DB->new("virtual_user");


DESCRIPTION

This package is the front end interface to slashcode. By looking at the database parameter during creation it determines what type of database to inherit from.


METHODS

createComment(FORM, USER, POINTS, DEFAULT_USER)

This is an awful method. You use it to create a new comments. This will go away. It locks tables, so fear calling it.

``Its like a party in my mouth and everyone threw up.''

Parameters
FORM
FORM, as in a form structure. Pretty much no good reason why we have to pass this.

USER
USER, as in a USER structure. Pretty much no good reason why we have to pass this.

POINTS
Points for the comment.

DEFAULT_USER
Default user to use if the person is being a coward about posting.

Return value
Return -1 on failure, and maxcid otherwise.

setModeratorLog(CID, SID, UID, VAL, REASON)

This set has some logic to it and is not a generic set method. All values must be accounted for or this will not work. Basically this creates an entry in the moderator log.

Parameters
CID
Comment ID.

SID
Story ID.

UID
UID of the user doing the moderation.

VAL
Value for moderation

REASON
Reason for moderation

Return value
No defined value.

getMetamodComments(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getModeratorCommentLog(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getModeratorLogID(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

unsetModeratorlog(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getContentFilters()

This returns all content filters in an array of arrays. It does not return filters that have been created but not defined.

Return value
This return an array of arrays. The order is currently defined by the schema.

createPollVoter(QID, AID)

Increment the poll count for a given answer.

Parameters
QID
QID is a question ID for polls.

AID
Answer ID for the poll

Return value
No defined value.

createSubmission(FORM)

This creates a submission. Passing in the form is optional.

Parameters
FORM
Standard form structure.

Return value
No defined value.

getDiscussions(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getSessionInstance(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

setContentFilter(FORM)

Save data into a filter.

Parameters
FORM
Optional form.

Return value
Fixed KEY.

setSectionExtra(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

createAccessLog(OP, DATA)

This creates an entry into the access log. Keep in mind that this uses different environmental variables for its entry.

Parameters
OP
Opcode for this entry

DATA
Optional data for the accesslog

Return value
Fixed KEY.

getDescriptions(CODETYPE, OPTIONAL, CACHE_FLAG)

The mother of all methods for HTML selects. It returns a hash with key pairs pulled from the database. The following are valid types: sortcodes statuscodes tzcodes tzdescription dateformats datecodes commentmodes threshcodes postmodes isolatemodes issuemodes vars topics maillist

Parameters
CODETYPE
This is one of the valid types

OPTIONAL
Sometypes have an option flag

CACHE_FLAG
By placing a value in this parameter you force the database to reload the caches hash for this type.

Return value
Hash reference filled with the codes.

getUserInstance(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

deleteUser(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getUserAuthenticate(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getNewPasswd(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getUserUID(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getCommentsByUID(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

createContentFilter(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

createUser(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

setVar(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

setSession(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

setBlock(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

setDiscussion(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

setTemplate(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getCommentChildren(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

deleteComment(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getCommentPid(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

setSection(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

setStoriesCount(SID, COUNT)

You should call this whenever you delete comments belonging to a story with the count of the number of comments you deleted.

Parameters
SID
Valid Story ID

COUNT
Count which will be subtracted from a stories comment count

Return value
None Returned.

getSectionTitle(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

deleteSubmission(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

deleteSession(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

deleteAuthor(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

deleteTopic(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

revertBlock(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

deleteTemplate(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

deleteSection(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

deleteContentFilter(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

saveTopic(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

saveBlock(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

saveColorBlock(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getSectionBlock(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getSectionBlocks(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getAuthorDescription(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getPollVoter(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

savePollQuestion(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getPollQuestionList(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getPollAnswers(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getPollQuestions(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

deleteStory(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

deleteStoryAll(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

setStory(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getSubmissionLast(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

updateFormkeyId(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

createFormkey(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

checkFormkey(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

checkTimesPosted(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

formSuccess(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

formFailure(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

createAbuse(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

checkForm(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

currentAdmin(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getTopNewsstoryTopics(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getPoll(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getSubmissionsSections(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getSubmissionsPending(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getSubmissionCount(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getPortals(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getPortalsCommon(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

countComments(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

countStory(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

checkForMetaModerator(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getAuthorNames(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getStoryByTime(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

countStories(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

setModeratorVotes(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

setMetaMod(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getModeratorLast(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getModeratorLogRandom(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

countUsers(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

countStoriesStuff(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

countStoriesAuthors(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

countPollquestions(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

createVar(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

deleteVar(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

setCommentCleanup(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

countUsersIndexExboxesByBid(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getCommentReply(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getCommentsForUser(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getComments(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getStoriesEssentials(KEY)

Get basic information about stories, suitable for displaying headline type information and designed to be fed to getOlderStories.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getCommentsTop(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getQuickies(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

setQuickies(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getSubmissionForUser(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getIsTroll(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

createDiscussion(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

createStory(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

updateStory(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getSlashConf(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

autoUrl(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getUrlFromTitle(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getTime(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getDay(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getStoryList(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getPollVotesMax(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getStory(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getAuthor(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getAuthors(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getPollQuestion(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getDiscussion(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getBlock(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getTemplate(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getTemplateByName(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getTopic(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getTopics(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getTemplates(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getContentFilter(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getSubmission(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getSection(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getSections(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getModeratorLog(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getNewStory(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getVar(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

setUser(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getUser(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getStories(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getSessions(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

createBlock(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

createTemplate(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

createMenuItem(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getMenuItems(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getMenus(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

sqlReplace(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

getKeys(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

sqlTableExists(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

sqlSelectColumns(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.

generatesession(KEY)

I am the default documentation, short and stout.

Parameters
KEY
Key, as in the KEY

Return value
Fixed KEY.


SEE ALSO

Slash(3), Slash::DB::Utility(3).