Author |
Message |
neralex
Site Admin
Joined: Aug 22, 2007
Posts: 1775
|
Posted:
Mon Sep 03, 2012 3:51 pm |
|
np Check the second modification, too. With the second mod you have more space in the admin section. |
|
|
|
|
andyb2
Regular
Joined: Aug 26, 2012
Posts: 60
|
Posted:
Wed Sep 05, 2012 3:15 am |
|
another curveball (and maybe easier?) to avoid having to limit lengths;
can you make it so that after x characters the row becomes "double height"- the easiest way I can explain this is akin to in Microsoft excel format cells> "wrap text" within a cell..... |
|
|
|
|
neralex
|
Posted:
Wed Sep 05, 2012 5:06 am |
|
What is the problem with limit lengths? Thats not easier, thats create an error, because then don't works the mouse over and the layout breaks. You can hide the topicnames in the news config, too. I have made the changes with the full width for the admin section in my RickTido Theme and have no issues. I think your titles are very long and you should always consider using shorter titles. The shorter and pregnanter a title is, the better it can also be found in a search engine. |
|
|
|
|
andyb2
|
Posted:
Wed Sep 05, 2012 5:49 am |
|
Ah;
ok. Was just a thought |
|
|
|
|
andyb2
|
Posted:
Wed Sep 05, 2012 6:09 am |
|
ok;
first modification done successfully- many thanks!
Is it possible to add pagination to the bottom of the selection? (I feel like I'm being "needy" now... sorry ) - this is so that can go through the articles and edit them that way.... (I've got quite a few- could take me a while otherwise to find the story I want to edit/ deactivate...) (So I can see articles prior to 695, for example)
|
|
|
|
|
neralex
|
Posted:
Wed Sep 05, 2012 6:18 am |
|
You have an News Archive and this have a pagination and a other needfull function to jump into a topic! I don't want add a pagination in the admin.php. For that i have created the news archive. In the admin section you will found an button, it calls News Archive.
/admin.php?op=newsarchive |
|
|
|
|
andyb2
|
Posted:
Wed Sep 05, 2012 6:24 am |
|
neralex wrote: | You have an News Archive and this have a pagination and a other needfull function to jump into a topic! I don't want add a pagination in the admin.php. For that i have created the news archive. In the admin section you will found an button, it calls News Archive.
/admin.php?op=newsarchive |
What I was after already exists.....
Thanks. (Feel an idiot now lol) |
|
|
|
|
neralex
|
Posted:
Wed Sep 05, 2012 8:06 am |
|
Now here a a mod for your questions in the TON forum to show thumbs at the end of the article from a specfic folder.
open the style.css of your theme and add at the two lines:
Code:.newsthumbs {margin-top:4px; margin-bottom:4px;}
.newsthumbs img {max-width:80px; margin:2px;}
|
You can set a specific max-width value in the css classes for your thumbs!
I hope you have added following line into your colorbox-settings.js before "});"! If not, then add the line in includes/jquery/colorbox-settings.js:
Code:$(".colorboxslide").colorbox({slideshow:true, slideshowAuto:false, scalePhotos:true, maxWidth:"800px", maxHeight:"600px"});
|
open now your theme.php anf found the function themearticle and found the last closing brace of the function. Add before:
Code: $fullsizefolder = 'image'; // folder with your fullsized images // leave it empty if you don't want open the fullsize images in a colorbox
$fullsizepath = 'uploads/' . $fullsizefolder . '/'; // path to your fullsized images
$thumbfolder = 'image';// folder with your thumbnails
$thumbpath = 'uploads/' . $thumbfolder . '/'; // path to your thumbnails
$temp_dir = dir($thumbpath);
$thumblist = '';
while($file = $temp_dir->read()) {
if ((ereg('^([_0-9a-zA-Z-]*)(.png|.PNG|.gif|.GIF|.jpg|.JPG)$',$file))) {
$thumblist .= $file . ' ';
}
}
closedir($temp_dir->handle);
$thumblist = explode(' ', $thumblist);
sort($thumblist);
echo ($thumbfolder != '' ? '<div class="text-center newsthumbs">' : '');
for ($i=0; $i < sizeof($thumblist); $i++) {
if(!empty($thumblist[$i])) {
if ($fullsizefolder != '') {
echo '<a rel="colorbox" class="colorboxslide" href="' . $fullsizepath . $thumblist[$i] . '" target="_blank"><img src="' . $thumbpath . $thumblist[$i] . '" border="0" alt="" /></a>';
} else {
echo '<img src="' . $thumbpath . $thumblist[$i] . '" border="0" alt="" />';
}
}
}
echo ($thumbfolder != '' ? '</div>' : '');
|
for your understanding:
I have set the fullsizefolder and the thumbfolder in my example for testing with the same folder but you can set different folders inside the uploads folder. If do you want work with a colorbox and the fullsize images, then must have the files with the same name. For example: in the thumbfolder you have an image with the name test.png as thumbnail, then you must have in the fullsizefolder a file with the same name in a higher resolution. If you leave the variable $fullsizefolder empty, then don't work the colorbox and you have only the thumbnails. So you have an little option to use the colorbox or not.
Remeber please every time: It works only for all images inside the thumbfolder. You can not set specific files. The scripts reads all existent files inside the thumbfolder and show it at the end of your article. |
Last edited by neralex on Wed Sep 05, 2012 9:13 am; edited 3 times in total |
|
|
|
andyb2
|
Posted:
Wed Sep 05, 2012 8:24 am |
|
you work fast!
Does the mod automatically create the thumbnails?
I'll need to spend some time looking at this and reading and then re-reading so I understand it correctly before I implement. (I may even grab a new "snapshot" of the live server with the latest news, etc as well as the database) and then test locally first....
I think it's going to take me longer to understand & implement than it did for you to write!
Many, MANY thanks! |
|
|
|
|
neralex
|
Posted:
Wed Sep 05, 2012 8:37 am |
|
andyb2 wrote: | Does the mod automatically create the thumbnails? |
No, it reads only images from a specific folder.
But it give an fast way with Photoshop and a batch to resize images from a folder on your local mashine.
[ Only registered users can see links on this board! Get registered or login! ]
[ Only registered users can see links on this board! Get registered or login! ] |
|
|
|
|
andyb2
|
Posted:
Wed Sep 05, 2012 8:42 am |
|
the issue is- I still need to process/ create thumbnails (hence mentioned before not always in a position to be able to do that- like at work (limited software if any available, apart from paint... ) or on my phone.... )
Something like this: [ Only registered users can see links on this board! Get registered or login! ] (only works on joomla)
I don't like joomla, by the way- used it for a different site I developed for somebody else..... |
|
|
|
|
neralex
|
Posted:
Wed Sep 05, 2012 8:48 am |
|
hmm... the ckeditor have a function to resize images in your upload folder. Make a right click on your images in the File Manager or you try some open source tools like this one:
[ Only registered users can see links on this board! Get registered or login! ] |
|
|
|
|
neralex
|
Posted:
Wed Sep 05, 2012 8:59 am |
|
andyb2 wrote: | Something like this: [ Only registered users can see links on this board! Get registered or login! ] (only works on joomla) |
If you want it, then you must try it self to implement into your page. This goes far beyond the frame. This is a very specific thing that is not necessary for everyone. I hope you can understand that I can not solve any specific issue. |
|
|
|
|
andyb2
|
Posted:
Wed Sep 05, 2012 9:03 am |
|
I understand I was using that as an example- I know some of the other scripts I've seen do similar (autothumbnail generation), etc.
Thanks for what you have done so far- much appreciated and has made RN more "usable", along with other mods |
|
|
|
|
|