corefunctions.php
 
Notifications
Clear all

corefunctions.php

27 Posts
2 Users
0 Reactions
6,383 Views
(@tammy)
Posts: 2577
Member Moderator
Topic starter
 

==build_alphalinks==
This function is used to build the alphabet links list on pages such as Browse Titles and Authors.  Two
arguments are passed to the function: the page url and the current letter (if any).

Example:

$output .= build_alphalinks("members.php?", $let);


 
Posted : 02/01/2007 11:46 pm
(@tammy)
Posts: 2577
Member Moderator
Topic starter
 

==categoryitems==

This function is used to add and remove stories from category counts.

Example:

TBD


 
Posted : 02/01/2007 11:48 pm
(@tammy)
Posts: 2577
Member Moderator
Topic starter
 

==captcha_confirm==

This function is used to to check the match of the captcha script.

Example:

if($captcha && !$loggedin && !captcha_confirm()) $output .= write_error(_CAPTCHAFAIL);


 
Posted : 02/01/2007 11:49 pm
(@tammy)
Posts: 2577
Member Moderator
Topic starter
 

==storiesInSeries==

This function pulls the complete list of stories in a series and all it's sub-series.


 
Posted : 02/01/2007 11:52 pm
(@tammy)
Posts: 2577
Member Moderator
Topic starter
 

==subseriesList==

This function builds a list of sub-series for a series.


 
Posted : 02/01/2007 11:53 pm
(@tammy)
Posts: 2577
Member Moderator
Topic starter
 

==seriesreview==

This function re-calculates the number of reviews and the rating for a series based on all stories in the series and all it's sub-series.


 
Posted : 02/01/2007 11:55 pm
(@tammy)
Posts: 2577
Member Moderator
Topic starter
 

==format_link==

This function formats a url into a functioning link.  The url is required.  The function also takes 2 optional arguments.  The first is for a text of the link.  If no text is supplied the URL becomes the text of the link.  The second optional argument is either 0 or 1 and determines whether the link opens in the same window (0) or a new window(1). 

format_link(string url [, string text][, int target])

Example:

$url = " https://efiction.org";

$link = format_link($url);

Outputs:

<a href="" https://efiction.org">https://efiction.org</a> ;"

Example 2:

$url = " https://efiction.org";
$text = "eFiction";

$link = format_link($url, $text);

Outputs:

<a href="" https://efiction.org">eFiction</a> ;"

Example 3:

$url = " https://efiction.org";
$text = "eFiction";
$target = 1;

$link = format_link($url, $text, $target);

Outputs:

<a href="" https://efiction.org" ;" target='_blank'>eFiction</a>


 
Posted : 03/01/2007 12:01 am
(@tammy)
Posts: 2577
Member Moderator
Topic starter
 

==ratingpics==

Formats a like/dislike or star rating into the pictures.

Example:

$rating = ratingpics($stories['rating']);


 
Posted : 03/01/2007 12:55 am
(@tammy)
Posts: 2577
Member Moderator
Topic starter
 

==catlist==

Builds the list of category links for the story/series/etc.  Will include the breadcrumbs depending on the site's setting.

Example:

$categories = catlist($stories['catid']);


 
Posted : 03/01/2007 12:56 am
(@tammy)
Posts: 2577
Member Moderator
Topic starter
 

==charlist==

This function builds the list of character links for a stories/series/etc.

Example:

$characters = charlist($stories['charid']);


 
Posted : 03/01/2007 12:57 am
(@tammy)
Posts: 2577
Member Moderator
Topic starter
 

==search==

The search function outputs the list of stories based on the queries passed to it and handles building the pageination links.

search(string countquery, string storyquery[, string pagelink])  It will return the number of stories.

Example:

$numrows = search(_STORYQUERY.$storyquery, _STORYCOUNT.$storyquery, "browse.php?");


 
Posted : 03/01/2007 1:02 am
(@becca)
Posts: 553
Honorable Member
 

Added to the Wiki.


 
Posted : 10/02/2009 2:59 pm
Page 2 / 2
Share: