Search found 20 matches

by tallphil
Wed Jul 28, 2010 4:11 pm
Forum: Modules/Add-Ons
Topic: News Category Dropdown - Pagination Problem
Replies: 5
Views: 1815

Re: News Category Dropdown - Pagination Problem

Of course - I wrote a global content block called news_categories with the following code: <form id="news_filters" name="news_filters"> <select name="news_category" onchange="location.href=news_filters.news_category.options[selectedIndex].value+'.html'"> <opti...
by tallphil
Mon Jun 07, 2010 3:41 pm
Forum: Modules/Add-Ons
Topic: New Module: Publications
Replies: 5
Views: 1721

Re: New Module: Publications

Right, I've gone through and re-written a whole load of code. The module now defaults to using FEUsers usernames, but will use the custom fields firstname and lastname if they're available. I've fixed the upload filetypes bug and I've also removed all direct database interactions for the FEU module,...
by tallphil
Tue Jun 01, 2010 1:08 pm
Forum: Modules/Add-Ons
Topic: Forge Roadmap Display
Replies: 0
Views: 585

Forge Roadmap Display

Is it just me, or does the CMSMS Forge 'Roadmap' tab for modules not display correctly? On the admin page it says that html is allowed, yet all 's are converted to < and >'s. And there's no formatting, or nl2br or anything, so it's impossible to format the roadmap...
by tallphil
Tue Jun 01, 2010 1:02 pm
Forum: Modules/Add-Ons
Topic: New Module: Publications
Replies: 5
Views: 1721

Re: New Module: Publications

Ah, ok - I think that the bug with the filetypes is because of the spaces (I need to use the trim() function I think), and the username problem is a stupid mistake on my part - it's using custom FEU fields which I had set up, oops! This will also cause the 'Lists' tab to be empty... I've noted these...
by tallphil
Tue Jun 01, 2010 11:46 am
Forum: Modules/Add-Ons
Topic: New Module: Publications
Replies: 5
Views: 1721

Re: New Module: Publications

Many thanks for your detailed comments Peciura, looking back at the code I think I need to go through and re-write a lot of it. I was very much working things out as I went along, so when I see pages like function.admin_listtab.php (one of the first I wrote) I can see that there are better ways to g...
by tallphil
Mon May 31, 2010 7:49 pm
Forum: Modules/Add-Ons
Topic: New Module: Publications
Replies: 5
Views: 1721

New Module: Publications

Hi all, I've released the first beta of my new module Publications today. It allows FrontEndUsers to create and maintain a list of Publications (designed for scientific publications / references). There are fields for Title, Reference, DOI and a single upload. They can edit and order publications on...
by tallphil
Mon May 31, 2010 7:38 am
Forum: Developers Discussion
Topic: [SOLVED] Using custom images with a module
Replies: 3
Views: 1936

Re: Using custom images with a module

Thanks NaN! Using your solution at the end (which is what I had wound up using independently) seems to work fine, and it's good to know that I'm not unnecessarily reinventing the wheel! :)
by tallphil
Sun May 30, 2010 9:11 am
Forum: Developers Discussion
Topic: [SOLVED] Using custom images with a module
Replies: 3
Views: 1936

Re: Using custom images with a module

Update: I've used the following to generate the base directory of my module: $moduledir = $gCms->config['root_url'].DIRECTORY_SEPARATOR.'modules'.DIRECTORY_SEPARATOR.                        '< module name >'.DIRECTORY_SEPARATOR.'images'.DIRECTORY_SEPARATOR; This still seems a bit pants, anyone know...
by tallphil
Sat May 29, 2010 11:55 pm
Forum: Developers Discussion
Topic: [SOLVED] Using custom images with a module
Replies: 3
Views: 1936

[SOLVED] Using custom images with a module

Hi there, I'm writing my first module, it ties into FEU to allow users to add and edit module content (much like the News fesubmit) and I'd like to use icons in the same way that I can in the admin pages with $gCms->variables['admintheme']->DisplayImage I'm quite happy to use my own icons (I can't h...
by tallphil
Sat May 29, 2010 11:40 pm
Forum: Modules/Add-Ons
Topic: CG User Directory - Searching All Fields?
Replies: 1
Views: 935

Re: CG User Directory - Searching All Fields?

For anyone who is interested, I got around this in a bit of a nasty work-around... I outputted all of the information that I wanted to be able to search into the table, and hid the extra stuff using css display:none;. I then used jQuery UI to do a dynamic search through the table. The end result wor...
by tallphil
Wed Apr 28, 2010 7:58 pm
Forum: Modules/Add-Ons
Topic: News Category Dropdown - Pagination Problem
Replies: 5
Views: 1815

Re: News Category Dropdown - Pagination Problem

Sorry all, I got around the problem by changing the way that the website works - the dropdown now redirects to a specific page with a {news category="something specific"} in it.

I couldn't figure out the previous problem.
by tallphil
Wed Apr 28, 2010 11:19 am
Forum: Modules/Add-Ons
Topic: [SOLVED] news module: show first 3 items with defferent template then the rest
Replies: 5
Views: 1855

Re: news module: show first 3 items with defferent template then the rest

No problem - I was looking for the same thing last week so it was fresh in my mind ;)
by tallphil
Wed Apr 28, 2010 11:06 am
Forum: Modules/Add-Ons
Topic: [SOLVED] news module: show first 3 items with defferent template then the rest
Replies: 5
Views: 1855

Re: news module: show first 3 items with defferent template then the rest

Oops, probably because I missed the dollar sign off the i... Try:

Code: Select all

{foreach from=$items item=entry key=i name=foo}
{if $i < 3}
    {* Markup for first three items *}
{else}
    {* Markup for rest *}
{/if}
{/foreach}
by tallphil
Wed Apr 28, 2010 10:55 am
Forum: Modules/Add-Ons
Topic: [SOLVED] news module: show first 3 items with defferent template then the rest
Replies: 5
Views: 1855

Re: news module: show first 3 items with defferent template then the rest

You can add key=i to your foreach statement, and then a nested if statement to count the iterations of the loop (assuming that your array is a normal numerical array, where the keys are 0,1,2,3...) {foreach from=$items item=entry key=i name=foo} {if i < 3}     {* Markup for first three items *} {els...
by tallphil
Wed Apr 28, 2010 8:39 am
Forum: Modules/Add-Ons
Topic: News Category Dropdown - Pagination Problem
Replies: 5
Views: 1815

News Category Dropdown - Pagination Problem

Hi all, I've set up CMSMS News with Categories and put in a Category Selector Dropdown box, as written about on CalGuy's website: http://calguy1000.com/Blogs/17/60/news-category-dropdown.html My problem now is that the pagination links don't honour the selected category. So, with pagelimit set to 4,...

Go to advanced search