Posts: 67
Threads: 6
Joined: Feb 2015
I've looked here and even in my sites directory and for the life of me I can't locate the directory where the links data is stored.
Anyone know where I can look for the data????
Thanks
Gene
Posts: 305
Threads: 15
Joined: Mar 2014
(2015-06-17, 04:12:18)elubben Wrote: I've looked here and even in my sites directory and for the life of me I can't locate the directory where the links data is stored.
Anyone know where I can look for the data????
Thanks
Gene
Most plugins store their data (as advised) in the data/other/ directory. In Link Manager's case, it is there too.
Link category data is stored in link_categories.xml & links are stored in links.xml in that directory.
Posts: 67
Threads: 6
Joined: Feb 2015
(2015-06-17, 05:01:59)Tyblitz Wrote: (2015-06-17, 04:12:18)elubben Wrote: I've looked here and even in my sites directory and for the life of me I can't locate the directory where the links data is stored.
Anyone know where I can look for the data????
Thanks
Gene
Most plugins store their data (as advised) in the data/other/ directory. In Link Manager's case, it is there too.
Link category data is stored in link_categories.xml & links are stored in links.xml in that directory.
Thanks Tyblitz... Was going crazy looking for a directory to sort the xml files....
Posts: 67
Threads: 6
Joined: Feb 2015
2015-06-18, 23:37:40
(This post was last modified: 2015-06-18, 23:38:06 by elubben.)
So far this plug-in is working great, BUT I'm starting to have some concerns on the amount of data that can be saved and parsed???
I have over 200+ links which are being placed into one file....how safe is that?
Maybe for the next re-write, you could have it save a page for each category link links00 for cat0, links01 for cat 1 etc.
I'm not a programmer and know very little if anything about php.
Gene
Posts: 185
Threads: 8
Joined: Apr 2012
I think that one file is safe enought, it's not accessible directly from browser..
btw. "amount of data" .. I saw that each time I print array or xml object of links, I see many recursions, so it will need some optimizations there too
Posts: 67
Threads: 6
Joined: Feb 2015
(2015-06-19, 01:21:37)morvy Wrote: I think that one file is safe enought, it's not accessible directly from browser..
btw. "amount of data" .. I saw that each time I print array or xml object of links, I see many recursions, so it will need some optimizations there too
As I add more video links, it does seem to become more sluggish on loading the "add Link" screen. I'll keep my eye on it for now.
Posts: 67
Threads: 6
Joined: Feb 2015
2015-07-05, 05:40:53
(This post was last modified: 2015-07-05, 05:41:29 by elubben.)
Just wondering if there's a way to change how the links are added to the links admin page. Currently, the newest link is amended to the bottom of the list and you need to pan down to review. IF it was added to the top of the list, it would be right there for you to review.
Just a thought!
Gene
Posts: 3
Threads: 0
Joined: Dec 2014
2015-08-11, 19:32:28
(This post was last modified: 2015-08-11, 19:45:11 by Simplicitie.)
Would it be possible to get the following layout out of links manager?
Code: <h3>Catagory_name_0</H3>
<ul>
<li> Catagory_name_0_link 1</li>
<li> Catagory_name_0_link 2</li>
</ul>
<h3>Catagory_name_1</H3>
<ul>
<li> Catagory_name_1_link 1</li>
<li> Catagory_name_1_link 2</li>
</ul>
etc, ect, ect,
This way you would get a page with all link but with catagory name and below the links for that catagory.
Posts: 185
Threads: 8
Joined: Apr 2012
..just read first post
(% link_category:1 %)
(% links:1 %)
Posts: 3
Threads: 0
Joined: Dec 2014
2015-08-11, 23:13:27
(This post was last modified: 2015-08-11, 23:13:46 by Simplicitie.)
(2015-08-11, 20:31:40)morvy Wrote: ..just read first post
(% link_category:1 %)
(% links:1 %)
i know these settings, but then i have to do it for each catagory what i was looking for is to have one place holder to show all links but do what you described. for instance (%all_links_per_catagory%)
Posts: 185
Threads: 8
Joined: Apr 2012
ah OK, so you want it to do everything automatically ..
so maybe you can try to read category xml file and count number of categories and then just make a loop to list name + links, or customize it totally with parsing of html output
Posts: 305
Threads: 15
Joined: Mar 2014
2015-08-13, 08:46:38
(This post was last modified: 2015-08-13, 08:48:11 by Tyblitz.)
@morvy that would work, though I prefer to use the existing functions on the plugin object.
@Simplicitie First follow the instructions in my previous post in this thread (copy the function).
After that you can add the following code in functions.php :
PHP Code: function get_all_category_links($categories) { $result = ''; foreach ($categories as $cat) $result .= output_category(return_category_name($cat), return_links_raw($cat)); echo $result; }
/* here you can define your output */ function output_category($category, $items = null) { $template = ''; if (count($items) > 0) { $template .= '<h3>' . $category . '</h3>'; $template .= '<ul>'; foreach ($items as $item) $template .= '<li>' . $item . '</li>'; $template .= '</ul>'; } return $template; }
Add the following code at the end in the function lm_filter in functions.php (starts at line 87):
PHP Code: /* (% link_categories:id[,id,..] %) */ $content = preg_replace_callback('/\(%\s*all_category_links:((\d+,*)+)\s*%\)/', function($matches) { $categories = explode(',', $matches[1]); $result = ''; foreach ($categories as $cat) { $id = intval($cat); if (return_category_name($id)) $result .= output_category(return_category_name($id) , return_links_raw($id)); } return $result; }, $content);
Now in your pages you can do (% all_category_links:1,2,3 %) , and in PHP <?php get_all_category_links(array(1,2,3)); ?>
Posts: 55
Threads: 13
Joined: Jul 2013
different displays for the same list
I have just installed links manager and like it however I have a couple of things I would like to do for which I do not see an option.
I want to have different displays for the same list
I have created categories and their relevant links. These are in the side bar. No problem with that.
i have also created a category page into which I want to put the category list. No problem there either but what I want is to have the list that is on the page to also show the description - but not show the description in the sidebar.
Is this possible, has anyone done this or something similar to put me on the right track, please?
Alternatively, I would like to have images on the page instead of text but still have text links in the sidebar, is that possible?
thanks
I'm no Einstein, nor do I profess to be. Just saying what I would try in the circumstances.
Posts: 185
Threads: 8
Joined: Apr 2012
yes, we did it, just read this thread you need to parse the output or change functions a little bit, then you can create multiple "Components" and use them in template, so one list can be shown in different ways
Posts: 1,247
Threads: 82
Joined: Feb 2011
If you have a https site, you might want to edit line 51 of links_manager.php :
PHP Code: register_script('jquery-validate', 'http://ajax.aspnetcdn.com/ajax/jquery.validate/1.10.0/jquery.validate.min.js', '1.10.0');
And change the http into https:
PHP Code: register_script('jquery-validate', 'https://ajax.aspnetcdn.com/ajax/jquery.validate/1.10.0/jquery.validate.min.js', '1.10.0');
So that the filebrowser works correctly.
Posts: 67
Threads: 6
Joined: Feb 2015
Ok I checked and didn't see this problem...
All my links are like this:
Full Mind ControlCreated By Celebrity Hypnotist Steve G. Jones, "full Mind Control" Will Give You The Power To Control Your Mind And Influence Others.
These should be a space between the red link and the black descriptive text..
Thanks
Gene!
Posts: 1,247
Threads: 82
Joined: Feb 2011
You could for example add following css code to your template (style.css):
Code: a.lm-link { padding-right: 1em; }
You can use a.lm-link for styling the links and span.lm-link-desc for styling the link description.
You could use <div class="linksmanager">...</div> around the (% links %) code to get standard included styling
( see file links_manager/css/links_manager_links.css )
Posts: 67
Threads: 6
Joined: Feb 2015
(2019-05-08, 06:40:28)datiswous Wrote: You could for example add following css code to your template (style.css):
Code: a.lm-link { padding-right: 1em; }
You can use a.lm-link for styling the links and span.lm-link-desc for styling the link description.
You could use <div class="linksmanager">...</div> around the (% links %) code to get standard included styling
( see file links_manager/css/links_manager_links.css )
I'll give the css code a try.
Thanks Again datiswous
Posts: 67
Threads: 6
Joined: Feb 2015
(2019-05-09, 02:11:54)elubben Wrote: (2019-05-08, 06:40:28)datiswous Wrote: You could for example add following css code to your template (style.css):
Code: a.lm-link { padding-right: 1em; }
You can use a.lm-link for styling the links and span.lm-link-desc for styling the link description.
You could use <div class="linksmanager">...</div> around the (% links %) code to get standard included styling
( see file links_manager/css/links_manager_links.css )
I'll give the css code a try.
Thanks Again datiswous
Tried that, placed it on line 24 of style css with no effect.
Posts: 3,491
Threads: 106
Joined: Mar 2010
Edit the file link_html.php (in plugins/links_manager/template/) and in line 13 insert a space (or whatever) just before <span class="lm-link-desc">...
Posts: 67
Threads: 6
Joined: Feb 2015
(2019-05-09, 02:37:33)Carlos Wrote: Edit the file link_html.php (in plugins/links_manager/template/) and in line 13 insert a space (or whatever) just before <span class="lm-link-desc">...
Thanks Carlos, I'll give it a shot!
Posts: 1,247
Threads: 82
Joined: Feb 2011
I think you should just place it at the bottom of your stylesheet. Also flush cash afterwards.
Posts: 67
Threads: 6
Joined: Feb 2015
(2019-05-09, 08:41:59)datiswous Wrote: I think you should just place it at the bottom of your stylesheet. Also flush cash afterwards.
Tried everything, no avail...
Posts: 67
Threads: 6
Joined: Feb 2015
2019-05-10, 03:30:14
(This post was last modified: 2019-05-10, 03:30:51 by elubben.)
Found my goof up, used <span class="lm-link-desc"> that was on line 15, not 13. Once I found it and changed it on line 13, it worked great.
Posts: 3
Threads: 0
Joined: Jun 2019
2019-07-03, 04:01:42
(This post was last modified: 2019-07-03, 05:39:22 by Sergey12.)
Good day. There is a question and a few improvements:
Question:
Tell me whether you can add support for Cyrillic in the functions ((% link:Fred %) and (% search_links:fish %). So that you can use it for Russian and Ukrainian languages, for example: (% link:Название ссылки %)?
Improvements:
1) To correctly display Cyrillic abbreviations in the file link_admin_panel.php, I replaced the substr with mb_substr.
2) To make it easier to navigate the numbering of links (useful for the function - (% link:7 %) - there are categories in it, but not in the links), you can add the code <?php echo $id; ?> near the # symbol in the file link_admin_panel.php.
Sentence:
It would be cool if the admin had a filter by category for links.
With a large number of links it will be convenient to find and edit certain links.
Sorry for my English.
|