Pagelinks vs sitelinks

eFiction Pagelinks could be fully replaced with e107 sitelinks but after some reconsidering, we decide to save this table and use it. Main reason is that this way there is possibility for extending it in future (you can't do it with the core table)

CREATE TABLE `fanfiction_pagelinks` (
  `link_id` int(11) NOT NULL auto_increment,
  `link_name` varchar(50) NOT NULL default '',
  `link_text` varchar(100) NOT NULL default '',
  `link_url` varchar(250) NOT NULL default '',
  `link_target` char(1) NOT NULL default '0',
  `link_access` tinyint(4) NOT NULL default '0',
  PRIMARY KEY  (`link_id`),
  KEY `link_name` (`link_name`)
) ENGINE=InnoDB;

Default data

No.

link_name (key)

Title

URL

Status

1

home

Home

index.php (e107 home)

2

recent

Most Recent

browse.php?type=recent

3

login

Login

login.php orig. user.php?action=login

4

adminarea

Admin

admin.php

5

logout

Logout

index.php?logout orig. user.php?action=logout

6

featured

Featured Stories

browse.php?type=featured

7

catslink

Categories

browse.php?type=categories

8

members

Members

authors.php?action=list

9

authors

Authors

authors.php?list=authors

10

help

Help

viewpage.php?page=help

11

search

Search

search.php

12

series

Series

browse.php?type=series

13

tens

Top Tens

toplists.php

14

challenges

Challenges

modules/challenges/challenges.php

15

contactus

Contact Us

contact.php

16

rules

Rules

viewpage.php?page=rules

17

tos

Terms of Service

viewpage.php?page=tos

18

rss

RSS

rss.php

19

login

Account Info

member.php orig. user.php

20

titles

Titles

browse.php?type=titles

21

register

Register

signup.php

user.php?action=register

22

lostpassword

Lost Password

fpw.php

user.php?action=lostpassword

23

newsarchive

News Archive

news.php (e107 news)

24

browse

Browse

browse.php

25

charslink

Characters

browse.php?type=characters

26

ratings

Ratings

browse.php?type=ratings

It is way how to add generated sublinks (dropdowns) to e107 sitelinks. There is already prepared 26 functions for this, but only those are supported and tested:

No.

key

Description

Version

9

authors

all Panels M with level 0

✅1.0.2

13

tens

all Panels T with level 0

✅1.0.2

24

browse

all Panels B with level 0 or < 2 for members

✅1.0.2

There is no way (not aware about it) how to insert first level links from plugin.

efiction class

Functionality

Description

From version

efiction::userlinks()

it returns all accessible pagelinks (level access)

✅1.0.2

efiction::get_userlink($key = null)

if $key is null, return all user links, otherwise returns link with key if user has access to it.

✅1.0.2

Userlink(s) naming was used to avoid misunderstanding with pagination (pagelinks term is used there)

global shortcodes (e_shortcode)

global shortcode for using anywhere where it is possible

Shortcode

Description

From version

{EFICTION_MENU_CONTENT}

it displays content of menu block

✅1.0.1

{EFICTION_LINK}

it displays one link by key

✅1.0.1

Examples:

{EFICTION_LINK: key=login&class=list-group-item} 
<ul class="navigation clearfix">
	{NAVIGATION=main}
	{EFICTION_MENU_CONTENT}
</ul>

Last updated