AlexWright Posted June 7, 2018 Posted June 7, 2018 This is badly needed. On communities with many apps or page databases open to members, this menu gets massive. Give us some options here. Allow categories on it or some sort of sorting option.
Adriano Faria Posted June 7, 2018 Posted June 7, 2018 23 minutes ago, AlexWright said: some sort of sorting optio It is probably sorted by the order of apps in Applications.
AlexWright Posted June 7, 2018 Author Posted June 7, 2018 13 minutes ago, Adriano Faria said: It is probably sorted by the order of apps in Applications. We tried that too, no luck. It's fine, I'm working out a solution.
AlexWright Posted June 8, 2018 Author Posted June 8, 2018 Essentially, it'd be nice to be able to do something like (obviously with different apps) and have it be controlable: But this doesn't work (Making a new app, replacing all of the cCreate block: <li id="cCreate"> <a href="#elCreateNew_menu" id="elCreateNew" data-ipstooltip="" data-ipsmenu="" title=""> <strong> <i class="fa fa-plus"> </i> {lang="create_menu"} </strong> <i class="fa fa-caret-down"> </i> </a> <style> .column { float: left; width: 33.3333333333333333333%; padding: 10px; border: 1px solid #888; } .row:after { content: ""; display: table; clear: both; } .desc { text-align: center; } </style> <div id="elCreateNew_menu" class="ipsMenu ipsMenu_auto ipsHide"> <ul> <div class="row"> <a href="{url=""app=gallery&module=gallery&controller=submit&_new=1"} "><div class="column"><img src="{resource="gallery.png" app="ecm" location="menu"}" alt="Gallery Image" width="100" height="100"> <div class="desc">Gallery</div></div></a> <div class="column"><img src="{resource="gallery.png" app="ecm" location="menu"}" alt="Gallery Image" width="100" height="100"> <div class="desc">Forum</div></div> <div class="column"><img src="{resource="gallery.png" app="ecm" location="menu"}" alt="Gallery Image" width="100" height="100"> <div class="desc">Story</div></div></div> <div class="row"> <div class="column"><img src="{resource="gallery.png" app="ecm" location="menu"}" alt="Gallery Image" width="100" height="100"> <div class="desc">Music</div></div> <div class="column"><img src="{resource="gallery.png" app="ecm" location="menu"}" alt="Gallery Image" width="100" height="100"> <div class="desc">Commission</div></div> <div class="column"><img src="{resource="gallery.png" app="ecm" location="menu"}" alt="Gallery Image" width="100" height="100"> <div class="desc">Marketplace</div></div></div> </div> </ul> </div> </li> It removes the popup window for Gallery and loads into a page instead. Probably something I'm doing wrong with the URL. Edit: It was. Got it working.
AlexWright Posted June 8, 2018 Author Posted June 8, 2018 I know it's kind of a hacky way to do it, but if anyone else is interested: 1. Make a development environment using the developer tools and a test/local install. 2, Make a new application (I called mine Enhanced Create Menu, though I realize it's not "enhanced" so to speak), with the file name "ecm" (or whatever, just remember this). 3. Go into the developer console, create a new hook. Select Theme Hook. Then select Front:Global. 4. Select "userBar" on the left side. In the CSS selector, select #cCreate (or open the Select Element tool and click on <li id="cCreate">). 5. Swap to "replace chosen element(s). Paste: <li id="cCreate"> <a href="#elCreateNew_menu" id="elCreateNew" data-ipstooltip="" data-ipsmenu="" title=""> <strong> <i class="fa fa-plus"> </i> {lang="create_menu"} </strong> <i class="fa fa-caret-down"> </i> </a> <style> .column { float: left; width: 33.3333333333333333333%; border: 1px solid #888; } .row:after { content: ""; display: table; clear: both; } .desc { text-align: center; } .container { position: relative; width: 100%; } .image { display: block; width: 100%; height: auto; } .overlay { position: absolute; top: 0; bottom: 0; left: 0; right: 0; height: 100%; width: 100%; opacity: 0; transition: .5s ease; background-color: #1b1b1b; } .container:hover .overlay { opacity: 1; } .text { color: white; font-size: 20px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); -ms-transform: translate(-50%, -50%); text-align: center } </style> <div id="elCreateNew_menu" class="ipsMenu ipsMenu_auto ipsHide"> <ul> <div class="row"> <div class="column"><div class="container"><img src="{resource="gallery.png" app="ecm" location="menu"}" alt="Gallery Image" width="100" height="100" class="image"> <a href="{url="app=gallery&module=gallery&controller=submit&_new=1"}" data-ipsdialog-size="medium" data-ipsdialog="true" data-ipsdialog-destructonclose="true" data-ipsdialog-close="false" data-ipsdialog-extraclass="cGalleryDialog_outer" data-ipsdialog-remotesubmit="true"><div class="overlay"><div class="text">Gallery Image</div></div></a></div></div> <div class="column"><div class="container"><img src="{resource="forum.png" app="ecm" location="menu"}" alt="Forum Topic" width="100" height="100" class="image"> <a href="{url="app=forums&module=forums&controller=forums&do=createMenu"}" data-ipsdialog="1" data-ipsdialog-size="narrow" data-ipsdialog-title="Select Forum"><div class="overlay"><div class="text">Forum Topic</div></div></a></div></div> <div class="column"><div class="container"><img src="{resource="story.png" app="ecm" location="menu"}" alt="Story Entry" width="100" height="100" class="image"> <a href="{url="app=blog&module=blogs&controller=submit"}" data-ipsdialog="1" data-ipsdialog-size="narrow" data-ipsdialog-title="Select Story" id="ips_uid_3906_2"><div class="overlay"><div class="text">Story Entry</div></div></a></div></div></div> <div class="row"> <div class="column"><div class="container"><img src="{resource="music.png" app="ecm" location="menu"}" alt="Song Upload" width="100" height="100" class="image"> <a href="{url="app=musicbox&module=musicbox&controller=post&do=createPlaylist&_new=1"}" data-ipsdialog="1" data-ipsdialog-size="narrow" data-ipsdialog-title="Upload New Song"><div class="overlay"><div class="text">Create Music</div></div></a></div></div> <div class="column"><div class="container"><img src="{resource="commissions.png" app="ecm" location="menu"}" alt="Commission Advertisement" width="100" height="100" class="image"> <a href="{url="app=sdsalespro&module=sdsalespro&controller=submit&_new=1"}" data-ipsdialog-size="narrow" data-ipsdialog="1" data-ipsdialog-title="Select a Category" data-ipsdialog-flashmessage="Saved"><div class="overlay"><div class="text">Commission Advertisement</div></div></a></div></div> <div class="column"><div class="container"><img src="{resource="market.png" app="ecm" location="menu"}" alt="Marketplace File" width="100" height="100" class="image"> <a href="{url="app=downloads&module=downloads&controller=submit&_new=1"}" data-ipsdialog="1" data-ipsdialog-size="narrow" data-ipsdialog-title="Select a Category"><div class="overlay"><div class="text">Marketplace File</div></div></a></div></div></div> </div> </div> </ul> </div> </li> Edit the URLs to your liking. Images go into ecm/dev/resources/menu (It'll be in your Applications folder). You can swap out images and links as necessary by replacing the relevant part of the above. The above is for Gallery, Forums, Blogs (we call ours Literature/Stories), Musicbox by @onlyME, SD Sales Portal Pro by @Spanner, and Downloads (we also use the term Marketplace here). If anyone wants to turn this into a fully fledged app, with actual settings, cheers. If not, -shrugs-. It's more for personal use and aesthetics, as well as to help the users not feel so confused on the Create menu.
Fosters Posted June 8, 2018 Posted June 8, 2018 That looks quite hot! Love it . Fits into an app from us which is awaiting MP approval right now
TDBF Posted June 8, 2018 Posted June 8, 2018 10 hours ago, AlexWright said: This is badly needed. On communities with many apps or page databases open to members, this menu gets massive. Give us some options here. Allow categories on it or some sort of sorting option. My other pet hate about this menu is when it Adds Pages items. Rather than just say News Articles you have 'New articles in News Articles'. ? It would also me nice if developers used php 'asort' options for Menu Arrays and lists for readability.
opentype Posted June 8, 2018 Posted June 8, 2018 31 minutes ago, TDBF said: you have 'New articles in News Articles'. You set those words/phrases up. You can change the two parts at any time to make it more logical, e.g. “New article in News”. IPS can’t just drop elements of that whole phrase. That could make the implementation on existing sites unusable, e.g. having “New Article” there five times because the container is not named.
TDBF Posted June 8, 2018 Posted June 8, 2018 12 minutes ago, opentype said: You set those words/phrases up. You can change the two parts at any time to make it more logical, e.g. “New article in News”. IPS can’t just drop elements of that whole phrase. That could make the implementation on existing sites unusable, e.g. having “New Article” there five times because the container is not named. I think we are talking about something different here. :) When CMS creates a title for the create menu, it uses a constant called 'cms_create_menu_records_x'. This constant is used in 'applications/cms/modules/admin/databases/database.php' around line: 1309 to define the Create Menus for CMS: $menu = array(); foreach( \IPS\Lang::getEnabledLanguages() as $id => $lang ) { $menu[ $lang->_id ] = \sprintf( $lang->get('cms_create_menu_records_x'), $values['database_lang_su'][ $lang->_id ], $values['database_name'][ $lang->_id ] ); } For example: This creates the 'Articles in Article' title in the Create Menu. Change the code to: $menu = array(); foreach( \IPS\Lang::getEnabledLanguages() as $id => $lang ) { $menu[ $lang->_id ] = $values['database_lang_su'][ $lang->_id ]; } This will remove the 'Articles in' part and leave just the title of the Database, for example the default Articles will just display as 'Article' on the create Menu. This would be the output: Kind Regards,
Adriano Faria Posted June 8, 2018 Posted June 8, 2018 That’s because you can have dozens of DBs and if the admin didn’t change the text ARTICLES, you simply wouldn’t know in which one you want to add a record. You can change but you need to bear in my mind that someone else may not. So you’d have dozens of “New Article” there.
TDBF Posted June 8, 2018 Posted June 8, 2018 14 minutes ago, Adriano Faria said: That’s because you can have dozens of DBs and if the admin didn’t change the text ARTICLES, you simply wouldn’t know in which one you want to add a record. You can change but you need to bear in my mind that someone else may not. So you’d have dozens of “New Article” there. ?Yes I understand that, but I wouldn't do that personally. Hence why I would change the Menu to suit myself. Database names should be unique anyway.
opentype Posted June 8, 2018 Posted June 8, 2018 1 hour ago, TDBF said: I think we are talking about something different here. ? No. 1 hour ago, TDBF said: When CMS creates a title for the create menu, it uses a constant called 'cms_create_menu_records_x'. Yes. And that language string is constructed from elements you set up for your Pages database. “News article” is not even a default I think.
Adriano Faria Posted June 8, 2018 Posted June 8, 2018 1 hour ago, TDBF said: Database names should be unique anyway. This is not the database name. It's the content item (record) name.
AlexWright Posted June 8, 2018 Author Posted June 8, 2018 10 hours ago, Fosters said: That looks quite hot! Love it . Fits into an app from us which is awaiting MP approval right now Let me know when that goes live. Would love one with settings. I'm still getting used to dev work on IPS.
TDBF Posted June 8, 2018 Posted June 8, 2018 1 hour ago, opentype said: Yes. And that language string is constructed from elements you set up for your Pages database. “News article” is not even a default I think. My initial statement was that I didn't want 'Articles in Article' shown in the Create Menu, but Article instead. I personally do not use the same naming conventions for my Database or recording naming (ie all my databases have different names and record names) so dropping the container name for me, isn't a problem. :) No, News Article is not a default Database. 1 hour ago, Adriano Faria said: This is not the database name. It's the content item (record) name. I never said it was :)
Adriano Faria Posted June 8, 2018 Posted June 8, 2018 2 hours ago, TDBF said: Database names should be unique anyway. Saying that you seem to be talking about the entry in the menu, since the whole discussion is about that. Anyway, whatever! ??
TDBF Posted June 8, 2018 Posted June 8, 2018 1 minute ago, Adriano Faria said: Saying that you seem to be talking about the entry in the menu, since the whole discussion is about that. Anyway, whatever! ?? lol all I wanted was to change the titles in the menu. ?
opentype Posted June 8, 2018 Posted June 8, 2018 24 minutes ago, TDBF said: lol all I wanted was to change the titles in the menu. ? And as it has been pointed out, you can do that, since it’s created from language strings using words and phrases you set up yourself. There just isn’t an addition editor to override the entries.
Josiah Wallingford Posted June 8, 2018 Posted June 8, 2018 Make it an application on the marketplace and I will do a video review.
AlexWright Posted July 19, 2018 Author Posted July 19, 2018 On 6/7/2018 at 11:12 PM, Fosters said: That looks quite hot! Love it . Fits into an app from us which is awaiting MP approval right now Have you included this anywhere yet? Would love a customizable version.
Fosters Posted December 7, 2018 Posted December 7, 2018 Sorry, this idea didn't look quite popular, so it wasn't worth to create it for us.
Maxxius Posted October 29, 2019 Posted October 29, 2019 Hi guys, I wonder is there a way to change the language strings that are used in the CreateMenu? My language is complicated and if I made it sound good when translated in CreateMenu then in other part of the suit the same phrase results in a grammatical error.
Sonya* Posted October 29, 2019 Posted October 29, 2019 21 minutes ago, Maxxius said: Hi guys, I wonder is there a way to change the language strings that are used in the CreateMenu? My language is complicated and if I made it sound good when translated in CreateMenu then in other part of the suit the same phrase results in a grammatical error. Same issue here. Even German (that is not so complicated as Russian) is difficult to customize. I am trying to reorder the words, delete replacements where possible but this does not solve translation issues entirely. Something that we used to live with...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.