> For the complete documentation index, see [llms.txt](https://playground.e107sk.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://playground.e107sk.com/e107-efiction-integration-update/outdated/pagelinks-vs-sitelinks.md).

# Pagelinks vs sitelinks

## e107 sitelinks (links) vs eFiction PageLinks)

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)

### Pagelinks 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. | <p>link\_name<br> (key)</p> | Title            | URL                                                                      | Status |
| --- | --------------------------- | ---------------- | ------------------------------------------------------------------------ | ------ |
| 1   | home                        | Home             | index.php (e107 home)                                                    |        |
| 2   | recent                      | Most Recent      | browse.php?type=recent                                                   |        |
| 3   | login                       | Login            | <p><strong>login.php</strong><br>orig. user.php?action=login</p>         |        |
| 4   | adminarea                   | Admin            | admin.php                                                                |        |
| 5   | logout                      | Logout           | <p><strong>index.php?logout</strong><br>orig. user.php?action=logout</p> |        |
| 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     | <p><strong>member.php</strong><br>orig. user.php</p>                     |        |
| 20  | titles                      | Titles           | browse.php?type=titles                                                   |        |
| 21  | register                    | Register         | <p><strong>signup.php</strong></p><p>user.php?action=register</p>        |        |
| 22  | lostpassword                | Lost Password    | <p><strong>fpw\.php</strong></p><p>user.php?action=lostpassword</p>      |        |
| 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                                                  |        |

## e\_sitelinks addon

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  |

{% hint style="info" %}
There is no way (not aware about it) how to insert first level links from plugin.&#x20;
{% endhint %}

## 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>
```

{% hint style="danger" %}
This part was quick way how to integrate e107 with existing efiction site. It will be probably changed in future.
{% endhint %}
